Re: Swedish characters



Hello,
 
In order a C program (with or without gtk+) can operate satisfactorily 
beyond the ASCII table (for german "umlauts", french accentuated 
characters, swedish characters...), the LC_ALL environment variable 
should be set to blank, in order the other LC_* environment variables 
could be set to their appropriate values (depending on the user's machine 
configuration).

The "locale" command allows you to verify the configuration. For example 
for a french machine :
$ locale
returns the following result :
LANG=fr_FR euro
LC_CTYPE="fr_FR euro"
LC_NUMERIC="fr_FR euro"
LC_TIME="fr_FR euro"
LC_COLLATE="fr_FR euro"
LC_MONETARY="fr_FR euro"
LC_MESSAGES="fr_FR euro"
LC_PAPER="fr_FR euro"
LC_NAME="fr_FR euro"
LC_ADDRESS="fr_FR euro"
LC_TELEPHONE="fr_FR euro"
LC_MEASUREMENT="fr_FR euro"
LC_IDENTIFICATION="fr_FR euro"
LC_ALL=

So, first check your configuration, to verify if the internationalization 
of your machine is correct.
If successful, you may include, within your C source code, the 
instruction which sets LC_ALL to blank :
- in the header section : #include<locale.h>
- in the first set of instructions in your main program (for example, 
after you call gtk_init) :
  setlocale (LC_ALL, "");

Normally, this allows you to work beyond the ASCII table in the widgets.
Please note this is not specific to gtk+, but should be applied for all C 
programmes. On this non-ASCII subject, last releases of gtk+ became less 
tolerant than in the past.

Sincerely Yours, Thierry Brichler



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]