Turkisch characters in MySQL

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

Turkisch characters in MySQL

#1

Postby dvanhussel » Tue Sep 15, 2009 1:31 pm

We have some problems with writing Turkish characters to a MySQL database.
- Ebase is forced to use UTF-8 (Internationationalization, dutch, properties, Always use UTF-8 )
- The MySQL database is set to UTF-8
- The default character set of the server (Novell Suse Open Enterprise Linux 10)

I retrieve some fields with a webservice containing Turkisch characters (ç, ı) the characters are shown ok in the browser.

When the data is written to the database 'Karaçaylı' is changed to 'Kara?ayl?'.

The strange thing is, that when I look up the query in the execution log from Ebase Desgigner, it looks ok (NaamP2='Karaçaylı') but the tomcat log shows: NaamP2=Kara?ayl?'

When I copy the query from the execution log and execute it directly in the database, the data is correctly written.

Where can i force Ebase/tomcat to use UTF-8?
0 x

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

Solved!

#2

Postby dvanhussel » Thu Sep 17, 2009 2:53 pm

With thanks to Andy from Ebase:

Have you specified UTF-8 on your MySQL connection string? You can do it like this:

jdbc:mysql://localhost/mydb?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8

With the bold part added to the connectionstring, the characters are written to the database in the correct format.
0 x


Who is online

Users browsing this forum: No registered users and 122 guests