[Gambas-user] Problema em Format( ) - Problem in Format ( )

Benoit Minisini gambas at ...1...
Tue Mar 29 10:47:36 CEST 2005


On Sunday 27 March 2005 15:56, Daniel Campos wrote:
> lbAudio wrote (in english):
>
> There's a problem when I try to show the week day name (in Portuguese).
> Extrange
> characters are shown.
>
> --- Daniel ---
>
> This problem also happens in Spanish, as Saturday is "Sábado" both in
> Postuguese
> and Spanish.
>
> I think the problem is that Format() calls a function from glibc to
> obtain the week day
> name. This function returns the name encoded in the system charset, but
> in Gambas
> all is UTF-8. I think this is a bug, and should be fixed returning the
> value converted
> to UTF-8. Meanwhile, if this fails:
>
> Message ( Format(myDate,"dddd"))
>
> You can replace it by:
>
> Message ( Conv( Format(myDate,"dddd"),System.Charset,Desktop.Charset ) )
>
>
> I think this problem can happen also in Frech with the following command:
>
> Message ( Format(myDate,"mmmm"))
>
> When month is : February, August or December (Février,  Août or Décembre)
>
> Regards,
>
> D. Campos
>

This is not a bug, but a requirement while all Linux systems are not UTF-8 
based. 

All glibc functions work with System.Charset, all GUI functions with 
Desktop.Charset. At the moment, only file functions work with UTF-8 (the 
interpreter translates from UTF-8 to System.Charset automatically).

Maybe I will simulate a complete UTF-8 system in a next version of Gambas, but 
this is a bit complicated.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list