Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Special character problem in mysql [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nyk
Guru
Guru


Joined: 28 Aug 2004
Posts: 527
Location: Bern (Switzerland)

PostPosted: Thu Sep 15, 2005 9:36 am    Post subject: Special character problem in mysql [SOLVED] Reply with quote

I have a table of people in mysql. Because I'm in Switzerland here, the people have "umlaute" (=special european characters) in their names. This worked fine, but after an mysql update, all special characters appear as black <?> symbols. The charcter set for the table is utf8.
For example the name Abbühl is now Abb�hl.
What was also odd, is that the size of varchar fields got smaller from the update. For example varchar(10) became carchar(3).

Is there any way to fix this?


Last edited by nyk on Fri Sep 30, 2005 12:35 am; edited 1 time in total
Back to top
View user's profile Send private message
elgato319
Guru
Guru


Joined: 15 Sep 2005
Posts: 546

PostPosted: Thu Sep 15, 2005 9:51 am    Post subject: Reply with quote

Try to edit your my.cnf

Code:

[mysqld]
set-variable    = default-character-set=latin1
set-variable    = default-collation=latin1_general_ci


You should use your old mysql/data from before the upgrade.
Back to top
View user's profile Send private message
nyk
Guru
Guru


Joined: 28 Aug 2004
Posts: 527
Location: Bern (Switzerland)

PostPosted: Thu Sep 15, 2005 1:22 pm    Post subject: Reply with quote

Thanks a lot, it WORKED!!

In this case, the tables might have been latin1 in the start (don't remember) and an update switched the default to utf8. So therefore the latin1 special characters don't make sense anymore, when interpreted as utf8. And now it back the latin1, where they look like they should...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum