br3nn4n Posted December 31, 2008 Share Posted December 31, 2008 I swear, if I can get a straight answer to this I will find a way to donate. I have never understood what mysql collations were. My site is set to iso 8859-1, and my database ascii ci. before I tried to build an rss feed for my site I was using the default latin1 swedish ci (something like that.). My feed would not validate with some of the characters coming from the database. So I changed it to ascii ci and the feed validates. The problem is that I don't think I have things right still. What is the normal collation people use? Also, if I want to still use iso-8859-1 (it sounded nice) what collation should I be using? The problem with the weird characters in the first place has to do with copying from Word documents, and having smart-quotes show up. Should I just be using utf-8? What should I be using? I have a code to remove Word special characters (regular expressions that runs before the data is input into the database) but I'm not sure what database collation should be used. Furthermore, what HTML encoding should I then output it with? I may have more questions but if I can get this figured out I will find a way to mail a donation to the site Link to comment https://forums.phpfreaks.com/topic/138967-character-encodingplease/ Share on other sites More sharing options...
Mchl Posted December 31, 2008 Share Posted December 31, 2008 RSS is a XML file, and all XML should be utf-8 encoded. See also this: http://code.openark.org/blog/mysql/mysqls-character-sets-and-collations-demystified Link to comment https://forums.phpfreaks.com/topic/138967-character-encodingplease/#findComment-726809 Share on other sites More sharing options...
Absorbator Posted December 31, 2008 Share Posted December 31, 2008 Also, a little note about the HTML encodig: The database encoding should be the same as HTML encoding, for instance if your MySQL encoding is utf-8, in META tag in HTML use "charset=utf-8" Link to comment https://forums.phpfreaks.com/topic/138967-character-encodingplease/#findComment-726896 Share on other sites More sharing options...
br3nn4n Posted January 1, 2009 Author Share Posted January 1, 2009 Also, a little note about the HTML encodig: The database encoding should be the same as HTML encoding, for instance if your MySQL encoding is utf-8, in META tag in HTML use "charset=utf-8" Yeah, I thought so. Any idea what I should be using in my database encoding if I'm using iso-8859-1? Also, I'm using phpmyadmin. What is the right way to change the whole database encoding? When I changed it to ascii ci I just did it column by column. TIA! Link to comment https://forums.phpfreaks.com/topic/138967-character-encodingplease/#findComment-727362 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.