Reading international character from a file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Reading international character from a file

Andre Saccomani
Hi guys,

I'm trying to make a subtitle adjuster using gambas. until now I succeed in open the file, put it into a listview and on. The problem is that international characters, like ã,é.. and on are showing as blocks and not as I expected.
Can someone help me with this?

Regards
Andre
Reply | Threaded
Open this post in threaded view
|

Re: Reading international character from a file

Benoît Minisini
On Tuesday 20 September 2005 00:19, Andre Saccomani wrote:

> Hi guys,
>
> I'm trying to make a subtitle adjuster using gambas. until now I succeed in
> open the file, put it into a listview and on. The problem is that
> international characters, like ã,é.. and on are showing as blocks and not
> as I expected.
> Can someone help me with this?
>
> Regards
> Andre

You must convert the characters of your file from their charset to the charset
used by the desktop (UTF-8). See the Conv$() function.

Regards,

--
Benoit Minisini
mailto:[hidden email]


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Reading international character from a file

Fabien Bodard
In reply to this post by Andre Saccomani
Le Mardi 20 Septembre 2005 00:19, Andre Saccomani a écrit :
> Hi guys,
>
> I'm trying to make a subtitle adjuster using gambas. until now I succeed in
> open the file, put it into a listview and on. The problem is that
> international characters, like ã,é.. and on are showing as blocks and not
> as I expected.
> Can someone help me with this?

the file use one charset (generally system one) and qt another
Use the conv$ function like that :

MyList.add(conv(sText, System.Charset, Desktop.Charset)

or under Gambas2

MyList.Add(DConv(sText))

Regards,
Fabien Bodard



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user