> Hi All,
>
> I'd really appreciate anyone's insight over here . Since I am trying to
> resolve this problem for the past two weeks.
> Both machines are win xp pro, MySQL 5.0, java connector 3.2.0 alpha,
> Tomcat 5.0.27.
Hi,
Defaults are evil. They hide in your system, and conspire to ruin your
day. Never trust a default.
So, what are the operating systems on the 2 machines? Can you say
anything about default character encoding on them? ( I think you can
write a small Java program, that gets that from the System class. See
documentation).
On Machine 2, does static content on pages (that never has seen the
database) also go bad, or is it only data from the database?
Either,
- your java listens to the system default encoding somewhere (it never
should; defaults are evil), and it is different in to two machines
or
- the database does the same
or
- both
or
- you use Tomcat through web servers on the two machines, and the web
servers add HTTP headers with encoding (dis)information (try to access
Tomcat directly)
or
- You have migrated database data from server 1 to server 2, and messed
up there.
Søren
alomrani@gmail.com - 07 Sep 2006 08:44 GMT
Thanks Soren for pointing out that.
I did a system parameter check ..
The only difference was in Mysql character set and collation ! eurika..
After running :
show variables like 'character_set%'
Machine 1:
character_set_client latin1
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results latin
character_set_server utf8
character_set_system utf8
character_sets_dir C:\Program Files\MySQL\MySQL Server
5.0\share\charsets\
Machine 2:
character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server utf8
character_set_system utf8
character_sets_dir C:\Program Files\MySQL\MySQL Server
5.0\share\charsets\
==============================
BUT :
When I run this it sets it temporarily
set character_set_client='latin1';
set character_set_results='latin1';
And when I try to display the variables again they are still the same (
unchanged )
------------------------------------
You pinpointed also that there could be a problem while migrating the
database. I checked that they are the same !
All collation variables where different now both machines are the same.
I am going crazy now.. not knowing what to do.
I am running windows XP on both machines.
> > Hi All,
> >
[quoted text clipped - 42 lines]
>
> Søren
alomrani@gmail.com - 07 Sep 2006 10:58 GMT
resolved
> Thanks Soren for pointing out that.
>
[quoted text clipped - 92 lines]
> >
> > Søren
Tom Cole - 07 Sep 2006 12:37 GMT
That's it? resolved? What about the poor guy who has the same problem 3
years from now and comes across this thread?
resolved.
That's gonna help him/her out a lot. Glad to see you got something out
of it though.
Soren Kuula - 07 Sep 2006 17:27 GMT
> That's it? resolved? What about the poor guy who has the same problem 3
> years from now and comes across this thread?
Hi,
Yeah, tell us what you did?
In fact I have a MySQL character encoding problem too (too lazy to fight
with it). Tell us what you did with that database please.
Søren