My webhost does not have mb_detect_encoding() compiled in its version of PHP, so I can't use it to detect whether I should use utf8_decode() on a string coming from an e-mail or not...

Does anybody have a function or an idea on how I can check for utf-8 without using mb_detect_encoding() ?

Thanks!

    10 days later

    Late... Searching for "UTF-8" on the forum 🙂.

    Why don't you check out the PHP source code and see if you can implement the mb_detect_encoding in PHP ?

      if he's buying hosting from a reseller i doubt they'll recompile PHP for him :p

      as to your question, i bleive that there is something (non-standard) at the beginnig of most UTF-8 things called the BOM (Byte Order Mark) which signifies UTF-8. again this is not standard, but i think that it should do. most editors etc use it, i think.

        Write a Reply...