some encoding/decoding problem

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
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

some encoding/decoding problem

Post by jmut »

%u0430%u043B%u0430%u0431%u0430%u043B%u0430


Could someone tell me function or something to revert this to UTF presentation.
This is some output comming from AJAX when typing cyrillic chars.
Hopefully someone knows what I am talking about.
jamiel
Forum Contributor
Posts: 276
Joined: Wed Feb 22, 2006 5:17 am
Location: London, United Kingdom

Post by jamiel »

Have you tried iconv() ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

FYI, those are UTF, UTF-16.

Here's a snippet I posted a while ago converting character entities to UTF-8. You could use hexdec() on each byte pair to get the decimal form.
viewtopic.php?t=36549
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post by jmut »

10x a lot for answers.
I was wrting on behalve of a friend of mine.
He seemed to have found a solution.
Thanks again.
Post Reply