dbTalk Databases Forums  

Greek language and mySQL 4.1.9

mailing.database.mysql-java mailing.database.mysql-java


Discuss Greek language and mySQL 4.1.9 in the mailing.database.mysql-java forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Antony J. Mandilas
 
Posts: n/a

Default Greek language and mySQL 4.1.9 - 02-16-2005 , 04:17 AM






--------------030309080100080502070401
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hello everyone,

recently i updated a server from 4.0.x version to 4.1.9, i did the data
tranfer between the two databases using a windows application.
Unfortunately what ever i do i can not read the greek contained words in
the tables.

i use the followin url for connection to the DB:

jdbc:mysql://xxxx/db?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8

the default character set in the database is utf-8.

i tried both connectors 3.0.16 and 3.1.6.

the most strange proble although is that using a windows application
(navicat 2004) i can read the data correctly. but i can not do so with
jdbc drivers and mySQL Query Browser.


Any help is appreciated


Best regards
Antony Mandilas

--
Antony J. Mandilas
Software Engineer
Net Technologies Ltd.
Mobile: +30 697 9114018
Email: mandilas (AT) nettechn (DOT) com
http://www.nettechn.com



--------------030309080100080502070401
Content-Type: text/plain; charset=us-ascii

--
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe: http://lists.mysql.com/java?unsub=my...ie.nctu.edu.tw
--------------030309080100080502070401--


Reply With Quote
  #2  
Old   
Paul Palaszewski
 
Posts: n/a

Default Re: Greek language and mySQL 4.1.9 - 02-16-2005 , 07:04 AM






--------------040409030504020601020408
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Antony!

We also have issues with latin2 characters and did not find any
settings, that work.

Which JDK are you using?

We just traced some issues down to the charset conversions of the sun
jdk 1.5.0. It seems to lie in the sun.io package within the
CharToByteConverter classes (sources are missing). Hm, we tried attached
test case and had an interesting observation: It works, if we specify
CP1252 instead of ISO8859_2 ... but we did not explore, if this can be
"used" to fix the database issues.

Now could someone please confirm following things (I did not find anything):
a) there is no bug report for the jdbc driver, jet people are having
troubles
b) there is no bug report for the jdk, that covers this issue

Best regards,
Paul Palaszewski

Antony J. Mandilas schrieb:

Quote:
Hello everyone,

recently i updated a server from 4.0.x version to 4.1.9, i did the
data tranfer between the two databases using a windows application.
Unfortunately what ever i do i can not read the greek contained words
in the tables.

i use the followin url for connection to the DB:

jdbc:mysql://xxxx/db?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8


the default character set in the database is utf-8.

i tried both connectors 3.0.16 and 3.1.6.

the most strange proble although is that using a windows application
(navicat 2004) i can read the data correctly. but i can not do so with
jdbc drivers and mySQL Query Browser.


Any help is appreciated


Best regards
Antony Mandilas


--
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/
_/ Grenzgasse 111, Objekt 9/4
_/ 2340 Mödling
_/ Tel,Fax: +43 2236 46 393
_/
_/ Ing. Paul Palaszewski, (Hons) B.Sc.
_/ Mobil: +43(650) 37 36 030
_/ E-Mail: mailtoaul.palaszewski (AT) bdm-systems (DOT) com
_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/



--------------040409030504020601020408
Content-Type: text/plain;
name="CharSetConvertionTest.java"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
filename="CharSetConvertionTest.java"

package com.bdm.test.jdk;

import junit.framework.TestCase;

/**
* @author Bernhard Lukassen, Paul Palaszewski
* @since 16.02.2005
*/
public class CharSetConvertionTest extends TestCase {
private String[] LATIN1 = {"a", "B", "b", "ä", "ßa", "üb", "ub", "ua", "üa", "sa", "ssa", "sza", "A", "Ä", "Ö", "á"};
private String[] LATIN2 = {"àb", "áb", "È", "í", "ž", "ø", "é", "Ú", "ý", "ab", "Ab", "Àa"};
private String[] UTF8 = {"ž","a", "B", "b1", "ä", "ßa", "üb", "ub", "ua", "üa", "sa", "ssa", "sza", "A", "Ä", "Ö", "á", "àb", "áb", "È", "í", "ø", "é", "Ú", "ý", "ab", "Ab", "Àa"};

private void doCharTest(String[] testStrings, String charset) throws Exception {
StringBuffer failedValues = new StringBuffer();
boolean hadErrors = false;

for (String testString : testStrings) {
byte[] bytes = testString.getBytes(charset);
String inStr = new String(bytes, charset);
if (!testString.equals(inStr)) {
if (hadErrors) failedValues.append(", ");
failedValues.append(testString + " != " + inStr);
hadErrors = true;
}
}
if (hadErrors) {
fail("Could not encode/decode: " + failedValues.toString());
}
}

public void testLatin1() throws Exception {
doCharTest(LATIN1, "ISO8859_1");
}

public void testLatin2() throws Exception {
doCharTest(LATIN2, "ISO8859_2");
}

public void testUtf8() throws Exception {
doCharTest(UTF8, "UTF-8");
}

public void testCP1252() throws Exception {
doCharTest(LATIN2, "CP1252");
}

}


--------------040409030504020601020408
Content-Type: text/plain; charset=us-ascii

--
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe: http://lists.mysql.com/java?unsub=my...ie.nctu.edu.tw
--------------040409030504020601020408--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.