[Gambas-user] gb.db (Charset)

Benoit Minisini gambas at ...1...
Fri Oct 26 13:06:26 CEST 2007


On mercredi 24 octobre 2007, Benoit Minisini wrote:
> On mercredi 24 octobre 2007, David Villalobos Cambronero wrote:
> > Hi all,
> >
> >     One of these days I realised somethig interesting. I use MySQL
> > version 6.0, and I create my databases manually, I mean, I don't use
> > gambas-database-manager for that. All my databases uses UTF-8, but when I
> > see the values in the connection, the property Charset has the value
> > "latin1", this property has to be UTF-8, right?
> >
> >     I haven't  any problem with this, but to me, it seems a bug. By the
> > way I use Mandriva 2007.1 and Gambas 1.9.90.
> >
> > Regards
> >
> > David
>
> Right, I noticed the same problem with MySQL 5 on Mandriva 2008.
>
> I think that the database client tells by default to the server that it
> want "latin1", even if the server uses UTF-8!
>
> But I must investigate to understand what happens really.
>
> Regards,

Well, on Mandriva 2008 it seems that the mySQL server cannot be switched 
to "UTF-8", and that the client cannot change its character set to "UTF-8" 
(with the mySQL SQL command 'SET NAMES'). "UTF-8" is a unknown character 
set... So t seems logical that the client charset is "latin1".

According to the documentation, when the client connect, it gets by default 
the default charset of the server, which should be UTF-8 in your case. So I 
don't see how you can get "latin1". What happens if you connect to your UTF-8 
server with the mysql command? Do you have latin1 as default character set? 
What is the default charset of the OS ($LANG variable)?


-- 
Benoit Minisini




More information about the User mailing list