MySQL Character sets, Servoy and php

Questions and answers regarding general SQL and backend databases

MySQL Character sets, Servoy and php

Postby Riccardino » Tue Mar 23, 2004 6:30 pm

When insering character like <'> or <M-l>, <M-h> etc in a text field, the values are correctly displayed in Servoy but are not read correctly from other apps accessing mysql.
For instance, if I connect to mysql using CocoaMySQL, all the <'> (the apostrophe character) becomes a <M-V> and so on.
Since the table I'm working on must be read with php, is there a mysql setting that can solve the problem?

PS I had the same problem dumping a mysql database, recreating it on a different location and re-opening with servoy: all the special characters were gone.
User avatar
Riccardino
 
Posts: 911
Joined: Thu Apr 24, 2003 11:42 am
Location: Ferrara, Italy

Postby IT2Be » Tue Mar 23, 2004 7:10 pm

I am not sure but can this have something to do with the encoding the database uses and servoy uses?
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby Riccardino » Tue Mar 23, 2004 8:02 pm

IT2BE wrote:I am not sure but can this have something to do with the encoding the database uses and servoy uses?

I think so. If I remember well, Servoy uses Unicode. But is there a way to set up MySQL to use unicode as well?
User avatar
Riccardino
 
Posts: 911
Joined: Thu Apr 24, 2003 11:42 am
Location: Ferrara, Italy

Postby Jan Blok » Tue Mar 23, 2004 9:50 pm

Servoy uses unicode internally (unicode is the only charset which can encode all other charsets), the databases uses a char encoding (depended on its settings) and the database driver converts Servoy unicode to the char encoding the database wants.
So in all cases the databasedriver must talk in the encoding the database is using, we suggest to use unicode also in the database to prevent any conflicts when distributing databases anywhere on the world
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby jcompagner » Tue Mar 23, 2004 10:30 pm

mysql can only use UTF from 4.1 (still alpha) see for example this link:
http://www.linuxforum.com/mysql/manual_Charset.html
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby Riccardino » Thu Mar 25, 2004 9:50 am

jcompagner wrote:mysql can only use UTF from 4.1 (still alpha) see for example this link:
http://www.linuxforum.com/mysql/manual_Charset.html


I see. Thanks.

Btw: will Sybase support Unicode?
User avatar
Riccardino
 
Posts: 911
Joined: Thu Apr 24, 2003 11:42 am
Location: Ferrara, Italy

Postby IT2Be » Thu Mar 25, 2004 10:16 am

Yes, it is a choice when you define the database...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 21 guests

cron