Hi,
I'm developing some code that used a SOAP call to insert records into a remote database. However, the SOAP call is reliant on the string fields in the inserted record being of character-set ISO-8859-1. If it encounters another type of character, the SOAP call throws an 'illegal token' error.
The problem is that the these strings can sometimes be of various other charsets (they are received, mime-decoded email bodies).
I cannot get to the SOAP interface implementation to see if it can be changed, and these non ISO-8859-1 emails are infrequent enough so that the non ISO-8859-1 characters can be stripped out / replaced with any other character for now. Not ideal but at least the email gets into the database with incorrect characters rather than blow up.
However, I cannot find any reference to force a string into a particular characterset. I can't use htmlenitities() and htmlspecialchars() as I don't want valid ISO-8859-1 characters changed to '"' versions.
Any thoughts on the fastest way to achieve this transformation?
Thanks