#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,664
    Rep Power
    171

    �, A charachter encoding issue?


    Hi;

    In the webpage the text shows as
    Code:
     you�ve
    but in textarea (edit page) as
    youíve
    I have set the encoding to UTF-8
    PHP Code:
    header('Content-Type: text/html; charset=UTF-8'); 
    What is the problem here?

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,989
    Rep Power
    375
    character: í
    is not equal to
    character: '

    Check if UTF-8 has that symbol
  4. #3
  5. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,068
    Rep Power
    9398
    You're using another encoding besides UTF-8 somewhere.
  6. #4
  7. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,664
    Rep Power
    171
    Originally Posted by paulh1983
    character: í
    is not equal to
    character: '

    Check if UTF-8 has that symbol
    Hello Paulh;
    I understand and that does not really answer my question
  8. #5
  9. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    There's an entry in the FAQ; take a look at that and see if you've taken care of all of the places where you need to set the character encoding.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,989
    Rep Power
    375
    Originally Posted by zxcvbnm
    Hello Paulh;
    I understand and that does not really answer my question
    yeah i know, i apologies for the useless post . I am not very familiar with encoding either like everything else ..

    if it displays as a ? does it go into your db as a ? too?

    Also sometimes if you change the browser's encoding settings ? revert to the correct character and then you can figure out what encoding to use in your code.
  12. #7
  13. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,664
    Rep Power
    171
    Originally Posted by paulh1983
    yeah i know, i apologies for the useless post . I am not very familiar with encoding either like everything else ..

    if it displays as a ? does it go into your db as a ? too?

    Also sometimes if you change the browser's encoding settings ? revert to the correct character and then you can figure out what encoding to use in your code.
    Hi;

    Stored in our database as Iíve

    Thanks
  14. #8
  15. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Does the database column use UTF-8? Does the database connection use UTF-8?

    To find out the encoding of this particular character, write it to a text file and open that file with a hex editor. Post the result here.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  16. #9
  17. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,664
    Rep Power
    171
    Originally Posted by Jacques1
    Does the database column use UTF-8? Does the database connection use UTF-8?.
    Database table and column:CHARSET=utf8.
    Database connection
    PHP Code:
    $db['default']['char_set'] = 'utf8';
    $db['default']['dbcollat'] = 'utf8_general_ci'
    Originally Posted by Jacques1
    To find out the encoding of this particular character, write it to a text file
    Please explain how do you mean.

    Thank you

IMN logo majestic logo threadwatch logo seochat tools logo