Config file and french characters

Discussion in 'Troubleshooting' started by moonwalker, Dec 25, 2010.

  1. moonwalker

    moonwalker aMember Pro Customer

    Joined:
    Aug 21, 2010
    Messages:
    52
  2. moonwalker

    moonwalker aMember Pro Customer

    Joined:
    Aug 21, 2010
    Messages:
    52
    Ok. I can solve the database problem by using the following function:
    iconv("UTF-8","ISO-8859-1","$string");

    But there is still a problem. When I look in the source code of the webpage, I see "UTF-8" as character set. But when I look in my browser for the character set, it's ISO-8859-1.

    When I remove the config file, it change to UTF-8. I checked the config file, but I can't make anything out of it. There is no character set in there.

    Please advise!

    Edit:
    Let me rephrase this: In which character set is Amember coded? When I visit the amember pages they are all in ISO set. Is there a way to change it to UTF-8? And would there be problems using UTF-8 instead of ISO?
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    aMember does not set encoding inside generated html pages(Was this something that you hardcoded yourself in header template? ). It only send encoding in headers (using php header function(inside common.inc.php):
    PHP:
    header("Content-type: text/html; charset=".$GLOBALS['_LANG'][$lang]['encoding']);
    By default french language file use ISO-8859-1 encoding (you can check this in fr-def.php)
    So if you change your pages to unicode(and add meta tag with encoding to header template) you should change encoding in fr-def.php and convert fr.php to be in unicode as well .
  4. moonwalker

    moonwalker aMember Pro Customer

    Joined:
    Aug 21, 2010
    Messages:
    52
    Hi Alex,

    Thanks for the reply.

    No I didn't hardcode anything in the header template. I checked also the fr-def.php and it's using the same encoding as my own fr.php language page. But even if I check amember in the English language, the encoding of the page is stille ISO and not unicode 8.

    Your demo too actually:
    http://demo.amember.com/signup.php

    If you use firefox check View -> Character Encoding. It's using ISO by default.

    I don't mind using ISO, I just may add other languages in the future and I'm afraid they won't show up nice when using the ISO encoding.

    Thanks again.
  5. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Yes and I told you about this in my reply.
    amember use ISO-8859-1 encoding by default.
    if you want to change it to unicode:
  6. moonwalker

    moonwalker aMember Pro Customer

    Joined:
    Aug 21, 2010
    Messages:
    52
    I missed that, I'm sorry.

    Thanks for the reply.

Share This Page