Character set problem Windows / Linux
I have a weird problem with international characters on our Linux/MySql system. I am 100% sure that this used to work, otherwise I would have given up. I read through tons of articles but to no avail. Maybe somebody can help.
Brief problem description:
--------------------------
- Usernames with international characters, e.g. Léon are stored as L?on
in MySql under Linux.
- The same setup, but having the application server and MySql
under Windows XP appears to work.
This problem started to show some time ago, but I do not remember
exaclty what the changes were then. I believe it was an upgrade from
MySql 3.x to 4.1. The data was then exportet from the Linux MySql into a
SQL script stored on Windows and then the script was run to import into
the new DB. I confirmed that all special chars were stored ok.
Setup:
------
Windows | Linux
Flash client -> Tomcat (Java servlet) -> JDBC -> MySql
Suse Linux 8.0
MySql version 4.1.11-standard-log
Apache Tomcat/4.1.30 on port 80
JDBC
Values from MySQL Administrator:
--------------------------------
character_set_client utf8
character_set_connection utf8
character_set_database latin1
character_set_results utf8
character_set_server latin1
character_set_system utf8
collation_connection utf8_general_ci
collation_database latin1_swedish_ci
collation_server latin1_swedish_ci
Table used:
-----------
CREATE TABLE users (
USER_ID varchar(16) NOT NULL default '0',
USER_NAME varchar(16) NOT NULL default '',
... some more cols
PRIMARY KEY (USER_ID),
KEY ACCOUNT_ID (ACCOUNT_ID),
KEY USER_NAME (USER_NAME),
CONSTRAINT users_ibfk_1 FOREIGN KEY (ACCOUNT_ID) REFERENCES accounts (ACCOUNT_ID)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='All users known to the system.'
With MySqlManager client charset set to latin1 I can enter chars such as é correctly into the DB. They then also show correctly in Flash. I can even login via the flash app as Leon (but not as Léon)!
As far I can see, MySql is setup in Windows the same way. However:
Windows XP
MySql version 4.1.10a-nt-max
Apache Tomcat/5.5.15 on port 8080
JDBC
Charctersets and table definitions are the same as on Linux.
I thought this must be a small config thing, but I am stick.
Why does it work under Windows and more important, how do I get it to work under Linux.
Marco Forster
Subject
Views
Written By
Posted
Character set problem Windows / Linux
5459
December 06, 2006 02:52PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.