[solved] Validating strings against UTF-8??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Kadanis
Forum Contributor
Posts: 180
Joined: Tue Jun 20, 2006 8:55 am
Location: Dorset, UK
Contact:

[solved] Validating strings against UTF-8??

Post 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
Last edited by Kadanis on Wed Apr 23, 2008 3:33 am, edited 1 time in total.
User avatar
Kadanis
Forum Contributor
Posts: 180
Joined: Tue Jun 20, 2006 8:55 am
Location: Dorset, UK
Contact:

Re: Validating strings against UTF-8??

Post 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.
Post Reply