Locale-support Linux

Implements Locale-support.

Summary
Locale-support LinuxImplements Locale-support.
CopyrightThis program is free software.
Files
C-kern/api/platform/locale.hHeader file of Locale-support.
C-kern/platform/Linux/locale.cLinux specific implementation file Locale-support Linux.
Implementation
charencoding_locale implementationSee charencoding_locale for interface description.
setdefault_locale implementationCalls C99 conforming function »setlocale«.
reset_locale implementationCalls C99 conforming function »setlocale«.
init
test

Copyright

This program is free software.  You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Author

© 2011 Jörg Seebohn

Files

C-kern/api/platform/locale.h

Header file of Locale-support.

C-kern/platform/Linux/locale.c

Linux specific implementation file Locale-support Linux.

Implementation

Summary
charencoding_locale implementationSee charencoding_locale for interface description.
setdefault_locale implementationCalls C99 conforming function »setlocale«.
reset_locale implementationCalls C99 conforming function »setlocale«.
init
test

charencoding_locale implementation

See charencoding_locale for interface description.  Calls POSIX conforming nl_langinfo to query the information.

setdefault_locale implementation

Calls C99 conforming function »setlocale«.  With category LC_ALL all different subsystems of the C runtime environment are changed to the locale set by the user.

The changed categories are

LC_COLLATEChanges character classes in »regular expression matching« and »string compare and sorting«.
LC_CTYPEChanges character classification, conversion, case-sensitive comparison, and wide character functions.
LC_MESSAGESChanges language of system messages (strerror, perror).
LC_MONETARYChanges monetary formatting.
LC_NUMERICChanges number formatting (such as the decimal point and the thousands separator).
LC_TIMEChanges time and date formatting.

reset_locale implementation

Calls C99 conforming function »setlocale«.  Set all subsystems of the C runtime environment to the standard locale “C” which is active by default after process creation.

init

test

Supports setting and getting of process locale (C runtime libraries).
Implements Locale-support.
const char * charencoding_locale(void)
Returns the name of the character encoding of the current selected locale.
Close