[Gtk-sharp-list] Convert Strings

Jorge Monsalvo jm_tecno2002 at yahoo.com.ar
Sat Mar 18 02:06:04 EST 2006

OK. What I did was a backup from my database and recreate it from sql file
adding a SET CHARACTER SET UTF8 as first command. Nothing happends.Second
attempt: Send SET CHARACTER SET command as first command as soon as my
application has a good connection from DB server. Nothing happends.
I'm really don't know what is happening.


Jorge Monsalvo

-----Mensaje original-----
De: gtk-sharp-list-bounces at lists.ximian.com
[mailto:gtk-sharp-list-bounces at lists.ximian.com] En nombre de Mario Carrión
Enviado el: Saturday, 18 March, 2006 02:07
Para: gtk-sharp-list at lists.ximian.com
Asunto: Re: [Gtk-sharp-list] Convert Strings

On 3/17/06, Jorge Monsalvo <jm_tecno2002 at yahoo.com.ar> wrote:
> Hi,
>         First of all, excuse me if this question is from a newbie, but 
> I can finish my application without an answer.
>         I'm working on a Windows application with glade#(gtk#), .NET 
> Framework 2.0 and MySQL 5.0. My main language is Spanish (excuse my 
> english) and all the data in tables are in spanish. The problem I have 
> is to convert string from data in MySQL tables to show in TreeView or 
> Text Entrys because the special characters we have in spanish (ñ, á, 
> ó, ¿, and others). When I create a query inside the MySQL application 
> I can see the strings with the right symbols, but when I make the 
> query from my GTK# application I get other characters that have no 
> relation with the real ones.
>         I was trying a solution with System.Text.Encoding class 
> methods but I have different results (chinese characters, characters 
> that desappear, and so).
>         Can somebody point me to the right direction to get a function 
> to use?. I remember that in C with plain gtk I used 
> "g_locale_from_utf8" function, but I can't find something like that in 
> Gtk#.
> Thanks to you all
Set your database encoding to utf-8, either by reCREATEing all or by using
"SET CHARACTER SET UTF8" as first SQL sentence.

Mario Carrión <mario.carrion at gmail.com>

1GB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 

More information about the Gtk-sharp-list mailing list