Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

I18N issue (no replies)

$
0
0
Hi,

We are having a Java based application which gets data from specific URL and inserts the data that we are interested into our database. Offlate we are seeing some issues with the data that inserted into our database. The URL's that are having string which is of foreign languages (Non-english) comes into database as "Junk" string. Please note that a word has mixed of both english + foreign character, in that english character comes good however other characters are not coming as we expecting. We are not worried much about CJK character as we are not goint support anyway. However we are supporting European languages and we are expecting this to be stored into our DB as such.

On the good part we are seeing the same application working fine when we are running program and database in Linux environment. We are seeing this issue only when everything runs on Windows. We tried running everything in "Windows Web Server 2008" and "XP" but the results are bad.

While running in windows, we tried changing the "default-character-set" & "character-set-server" to utf8 but that doesn't seem to be resolving the issue.

One things i noticed is that while running a one liner program in Windows the default character set is printed as "windows-1252" and in Linux it printed as "UTF-8". The one line program has the following line in it,

System.out.println(java.nio.charset.Charset.defaultCharset().name());

The following data is coming as a result of running in linux which is correct,

Señor Moose Café

In Windows it goes wrong as like below,

Se±or Moose CafΘ

We are running the program in JDK 1.6 with MyConnector "mysql-connector-java-5.1.18-bin.jar". The database version that we tried are as follows in windows,

5.5.17,
5.1.59-community

The Linux DB version is which is latest, Please note that we do not see issue with older version too...

5.5.20

Is there a way to fix the issue? As it is a show stopper for the entire project and it require some effort to migrate entire program to work in linux which we wanted to avoid.

-- M2

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>