[Gambas-user] gb.db (Charset)

Benoit Minisini gambas at ...1...
Fri Oct 26 14:41:14 CEST 2007


On vendredi 26 octobre 2007, David Villalobos Cambronero wrote:
> Well, first that ofall, thank you very much for your information, now I
> have clear how the things work.
>
> In the first mail I believe that I forgot to mention that I have not had
> problems with the storage of special characters, only that seemed to me to
> be very strange that the charset was in latin1.
>
> My predetermined language is es_ES, and Spanish has many special
> characters, and the truth there does no seem to be a problem.
>
> I believe that is better to have clearly why things happen.
>
> Once again.... thanks
>
> David
>
>

Well, you only have problems when you want to sort strings inside the server, 
with SQL requests: then the server charset must match the charset used for 
encoding your strings.

Apart from that, you can purely ignore the database charset, by always storing 
your strings from Gambas in UTF-8, and reading them by doing no conversion.

This is the reason of the "use database charset" menu in the database manager 
pop-up menu. If this menu is checked, then the database manager will do 
charset conversion by using DB.Charset and System.Charset. If this menu is 
not checked, the database manager will not do any conversion at all, and you 
will see the strings as the database server send them to you.

Regards,

-- 
Benoit Minisini




More information about the User mailing list