Jump to content

Character encoding...please?


br3nn4n

Recommended Posts

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

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.