Menu

#6 UTF-8 Does Not Work

open
nobody
None
5
2005-04-14
2005-04-14
Anonymous
No

When I add Turkish character included text, it doesn't
displayed properly.
Then I changed CharSet to iso-8859-9(Turkish) in
guestbook.ini file then it worked fine.

So there is a problem with UTF-8 encoding.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    UTF-8 does not work on my Debian/sid installation, too
    but this may be because I didn't generate any UTF-8 locales :-)
    a hint to the default UTF-8 encoding in
    welcomeMessage.inc.html would be nice

     
  • Sebastian Wassmuth

    Logged In: YES
    user_id=727116

    I just added an anonymous comment, but it only showed up
    when I'm logged in... I don't know why. So I post it again:

    UTF-8 does not work on my Debian/sid installation, too
    but this may be because I didn't generate any UTF-8 locales :-)
    a hint to the default UTF-8 encoding in
    welcomeMessage.inc.html would be nice

     
  • salagadoola

    salagadoola - 2005-05-11

    Logged In: YES
    user_id=1276328

    When I add Chinese characters in the field "Your Name:", it
    displays properly if I just press "Submit Post", but doesn't
    display properly if I press "Preview Post".

    I found it's because of the htmlentities() function. Then I
    changed line 69 and everything looks ok now.
    Here is my modification:
    //$input = htmlentities(stripslashes($input),
    ENT_QUOTES);
    $input = stripslashes($input);
    $input = preg_replace("/&/", "&", $input);
    $input = preg_replace("/</", "&lt;", $input);
    $input = preg_replace("/>/", "&gt;", $input);

     

Log in to post a comment.