View previous topic :: View next topic |
Author |
Message |
nyk Guru
Joined: 28 Aug 2004 Posts: 527 Location: Bern (Switzerland)
|
Posted: Thu Sep 15, 2005 9:36 am Post subject: Special character problem in mysql [SOLVED] |
|
|
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 |
|
|
elgato319 Guru
Joined: 15 Sep 2005 Posts: 546
|
Posted: Thu Sep 15, 2005 9:51 am Post subject: |
|
|
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 |
|
|
nyk Guru
Joined: 28 Aug 2004 Posts: 527 Location: Bern (Switzerland)
|
Posted: Thu Sep 15, 2005 1:22 pm Post subject: |
|
|
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 |
|
|
|