Page 1 of 1

[solved] Validating strings against UTF-8??

Posted: Wed Apr 23, 2008 3:21 am
by Kadanis
Basically, I have a number of forms in a web app, which can take typed input or uploaded HTML file input. This is then altered by the system and converted into XML and streamed to a partner companies servers. However, we get a number of stream errors due to non UTF-8 characters being in the code.

Does anyone know of a way to validate the form input / strings against UTF-8? So that I can return errors to the user before the conversion/stream takes place.

Thanks in advance

Re: Validating strings against UTF-8??

Posted: Wed Apr 23, 2008 3:33 am
by Kadanis
to answer my own question, after a little more googling

http://phputf8.sourceforge.net/

PHP UTF-8 libraries. Pretty useful. Thought I'd post the link in case anyone else is ever looking for this sort of thing.