December 17th, 2013, 03:37 PM
Converting character to a different charset
I'm trying to use php to convert "p" to "π", which is its equivalent in the Greek charset:
I've tried using iconv:
and versions of mb_convert_encoding to no avail. I know my current encoding is ASCII.
I'm doing this for multiple greek letters, which is why I'm just using a str_replace()
December 17th, 2013, 05:02 PM
Character encodings won't help you there. They don't do transliteration - just literally converting a character, like "U+0070 LATIN SMALL LETTER P" or "U+03C0 GREEK SMALL LETTER PI", between its byte representation in the various encodings.
As far as I know you're basically stuck with doing string replacements by yourself.