problems with UTF-8 encoding in PHP

Posted by user296516 on Stack Overflow See other posts from Stack Overflow or by user296516
Published on 2010-05-16T15:26:51Z Indexed on 2010/05/16 15:30 UTC
Read the original article Hit count: 374

Filed under:
|

Hi guys, The characters I am getting from the URL, for example www.mydomain.com/?name=john , were fine, as longs as they were not in Russian.

If they were are in Russian, I was getting '????'.

So I added $name= iconv("cp1251","utf-8" ,$name); and now it works fine for Russian and English characters, but screws up other languages. :)))

For example 'Janis' ( Latvian ) that worked fine before iconv, now turns into 'j??nis'.

Any idea if there's some universal encoder that would work with both the Cyrillic languages and not screw up other languages?

© Stack Overflow or respective owner

Related posts about php

Related posts about utf-8