Note that there are some explanatory texts on larger screens.

plurals
  1. POISO-8559-1 encoding is storing incorrect data in latin1 DB. A few questions
    primarykey
    data
    text
    <p>Now I’m going to say the dreaded ‘E’ word. Encoding. I’m aware that it has been <a href="http://www.varesano.net/blog/fabio/latin1%20encoded%20tables%20or%20databases%20utf8%20data%20stored%20convert%20them%20native%20mysql%20utf8%20tables" rel="nofollow">covered</a> <a href="http://www.bluebox.net/about/blog/2009/07/mysql_encoding/" rel="nofollow">to</a> <a href="http://nicj.net/mysql-converting-an-incorrect-latin1-column-to-utf8" rel="nofollow">death</a> all over the Internet but there are a couple of things I need clarifying.</p> <p>Now I have a script whose charset is ISO-8559-1 and its writing to series of latin1_swedish_ci fields. The data within these fields though isn’t accurate, I get symbols like ê and çà within my strings. These are obviously "non-standard" characters.</p> <p>Now when it comes to output, if I serve my HTML in ISO-8859-1 my content doesn’t render correctly but when I use UTF-8 <strong><em>most</em></strong> of it does.</p> <p>Now to the questions:</p> <ol> <li><p>I’m assuming the database is storing the data incorrectly to the human eye as it needs to use multiple bytes, is this correct?</p></li> <li><p>Why do most symbols render correctly when using UTF-8 charset but not when using ISO?</p></li> <li><p>In order to get all characters to save in the database and render correctly I assume I need to use UTF-8 throughout. Moving forward would you take the hit or is it acceptable to keep this kind of data in the DB and convert it each time. We have a lots and lots of non-english characters.</p></li> </ol> <p>Thanks</p> <p>Richard</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload