Detect character encodings

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
bugmenot
Forum Newbie
Posts: 23
Joined: Fri Oct 10, 2008 11:44 am

Detect character encodings

Post by bugmenot »

Hi guys,

I got a lot of txt files, and I need to detect encoding of them. I need to call some function, which will tell me encoding of input string and it will return name of encoding, for example UTF8, ISO-8859-1, ISO-8859-2...

I tried http://sk.php.net/manual/en/function.mb ... coding.php but it doesnt work properly. mb_detect_encoding('skúška'); returns UTF-8, what is wrong.

Anybody ?

Thank you.
Post Reply