#1
  1. hiding my <b> from ur <strong>
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2004
    Posts
    959
    Rep Power
    181

    Converting character to a different charset


    I'm trying to use php to convert "p" to "π", which is its equivalent in the Greek charset:

    http://www.charset.org/charactersets.php?charset=iso-8859-7

    I've tried using iconv:
    iconv('ASCII','ISO-8859-7',$value);

    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()

    Thanks all.
    ****
    Enjoy my post? Drop some props by hitting the scales button up top. JBL

    Website Design in Los Angeles and Washington, DC by PoweredPages.com
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,295
    Rep Power
    9400
    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.

IMN logo majestic logo threadwatch logo seochat tools logo