views:

205

answers:

1

Hi guys - I have a simple script which inserts values from a text file into a mysqldatabase - however some accented characters aren't inserted properly. Like lets say I have a word:

Reykjavík

I try to insert it using a simple insert sql statement and instead I this value ends up in the database????

Reykjavík

How do I fix this?

====EDIT====

I tried to change the collation - the thing is that I'm using navicat here and if I lets say try to insert any such word with accentuated characters like this using the navicat QUery generator or panel it is inserted perfectly with no problem whatso ever - however my php script when it runs a similar query end s up putting trash in the table :( whats going on here...

+1  A: 

The set of questions marks is because you are inserting a character whose encoding is not understood by MySQL. Try collating with utf8_bin. This should work.

Saeros
Thanks but how do I collate?
Ali
Oh uh never mind I figured that out thanks :)
Ali
:( its not working
Ali
Make sure the php encoding is set to UTF8
LiraNuna
Woo Hoo :D It works thanks for the help!!!!
Ali