Language and character set settings
Purpose of application locale definition
The locale settings matters at compile time and at runtime. At runtime, the locale
changes the behavior of the character handling functions, such as UPSHIFT and DOWNSHIFT. It also changes
the handling of the character strings, which can be single byte or multibyte encoded.
Compilation errors will occur if the source files contain characters that do not exist
in the encoding defined by the current locale.
$ fglrun -i
Charmap : UTF-8
Multibyte : yes
Stateless : yes
Length Semantics : CHAR
Mobile platforms
On iOS and Android™ mobile platforms, the locale is automatically defined to be UTF-8. This cannot be changed.
The language conventions and system messages are defined by the device settings.
Microsoft™ Windows® platforms
On Windows platforms, when the LANG environment variable is undefined, the language and character set defaults to the system locale which is defined by the regional settings for "non-Unicode applications". For example, on a US-English Windows, this defaults to the 1252 code page.
It is not recommended to set the LANG variable, unless your application uses a UTF-8 locale. For Single Byte Character Set locales, use the Windows system locale.
.utf8:C:\> set LANG=.utf8Since Genero FGL 5.01.02, the .utf8 locale is recommended for UTF-8 on
Windows platforms. For backward compatibility, LANG=.fglutf8 is still supported
and is equivalent to LANG=.utf8.
Before version 5.01.02, Genero FGL implemented its own UTF-8 character handling on Windows,
enabled with LANG=.fglutf8, because the C runtime library did not support UTF-8
locales. Starting with Windows 10 version 1803, the Universal C Runtime setlocale() function supports the UTF-8
code page, and Genero FGL now relies on it.
UNIX™ platforms
On UNIX-based platforms, The LANG/LC_ALL/LC_CTYPE environment variables define the local settings for the application.
The LC_CTYPE environment variable can be set to overwrite the LANG/LC_ALL setting. Make sure that LC_CTYPE does not define a different encoding than your application locale is requesting.
language_territory.codeset
$ LC_ALL=en_US.iso88591; export LC_ALL
$ LC_ALL=en_US.utf8; export LC_ALL
What are possible locales on my platform?
Usually OS vendors define a specific set of values for the language, territory and codeset. For example, on a UNIX platform, you typically have the value "en_US.ISO8859-1" for a US English locale. A list of available locales can be found by running the locale -a command. You may also want to read the man pages of the locale command and the setlocale function.
On Microsoft Windows, use the default system encoding. For more details about supported locales, search the Microsoft MSDN documentation for "Language and Country/Region Strings".