tags:

views:

75

answers:

2

For some reason, my mysql table is converting single and double quotes into strange characters. E.g

"aha"

is changed into:

“aha”

How can I fix this, or detect this in PHP and decode everything??

+1  A: 

The encoding of your mysql client and your server don't match. Use SET NAMES to match the character set of the connection to the one used in your PHP files.

soulmerge
Which character set do I need to use?
Click Upvote
Using SET NAMES 'latin1' fixed it
Click Upvote
A: 

It seems that the UTF-8 encoded string “aha” (binary 0xE2809C 0x61 0x68 0x61 0xE2809D) is interpreted with Windows-1252. There this byte sequence represents the character sequence “aha”.

Gumbo