1 LIBCHARSET - portable character set determination library
3 This library provides a function which determines the character set / encoding
4 of text in the currently selected locale (the LC_CTYPE locale facet).
6 It is useful for portable programs which need to process text in other
7 encodings and locales than the currently selected one. Possible uses:
9 * Use of Unicode in POSIX compliant applications.
10 * Conversion of text between the current locale's encoding and UTF-8 (or
11 any other given encoding).
14 In theory, this would be very simple: POSIX provides the nl_langinfo function,
19 returns the encoding name. But the nl_langinfo function still does not exist
20 on some systems, and on those where it exists it returns unstandardized
21 variations of the encoding names, like (on Solaris) "PCK" for "Shift_JIS".
23 This library fixes these flaws and provides a function
25 const char * locale_charset (void);
27 It determines the current locale's character encoding, and canonicalizes it
28 into one of the canonical names listed in config.charset. The result must
29 not be freed; it is statically allocated. If the canonical name cannot be
30 determined, the result is a non-canonical name.
35 As usual for GNU packages:
37 $ ./configure --prefix=/usr/local
42 This library is used in
48 To integrate this library into your package:
49 - Either from this package. See file INTEGRATE.
51 <http://www.gnu.org/software/gnulib/MODULES.html#module=localcharset>
55 The libcharset directory of
56 ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.8.tar.gz
59 http://www.haible.de/bruno/packages-libcharset.html
62 Bruno Haible <bruno@clisp.org>