No announcement yet.

Charsets problem with strange weird characters showing up

  • Filter
  • Time
  • Show
Clear All
new posts

  • Charsets problem with strange weird characters showing up

    I had a problem where quotes single or double would translate into strange looking characters.
    I am working on a project and when I see the charsets it takes for default I see UTF-8.
    My database was taking the "Latin1" default.

    I was told I had to make both the same therefore I went to the database and changed all "Latin1" to UTF-8.
    My assumption would have been that the matching charsets would get rid of strange weird characters from showing up on screens but it does not, I now this this:
    See the "ugly" question mark inside a black triangle below. Can anyone tell me how to correct this? looks pretty ugly on screens.


  • #2
    Did you do a migration between the two charsets or did you 'just' change the charset of your database? Point is that the way data is stored depends on this. So if you have inserted data UTF way into a Latin database there will have been conversions which are not automatically reverted back. But if you enter clean data and the charsets match (and I always recommend using UTF8) then for new data it should work as expected. In that case your current data needs to be corrected and I fear by hand...
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /


    • #3
      The story is a bit more complicated, the program with which you look at the characters in your database also has to show in the same characterset. So if you have your data stored as UTF-8 then your website must be in utf-8. I dont know which program you use to show your string. If you view your string then you should first check the hex code of the string against the official UTF-8 character table, this goes specially fot the special characters. If the hex code is correct then your viewer also should show it IF it is showing as UTF-8. Many windows programs do NOT show utf-8 since utf-8 is not supported under windows, so a translation is made (usually to unicode). On the web tho utf-8 is shown, so you should have your web pages in utf-8 and you should then be able to sho your utf-8 characters properly.
      So in short: check the raw data in the database first. Then check the data in a web page.
      UTF8 does work, you just have to be aware that every program that uses the data then also uses utf8 if you really want to use it.