Branch
Hash :
7a3418bb
Author :
Date :
2018-09-22T14:23:53
Update from gnulib. Move mapping tables into the code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
LIBCHARSET - portable character set determination library
This library provides a function which determines the character set / encoding
of text in the currently selected locale (the LC_CTYPE locale facet).
It is useful for portable programs which need to process text in other
encodings and locales than the currently selected one. Possible uses:
* Use of Unicode in POSIX compliant applications.
* Conversion of text between the current locale's encoding and UTF-8 (or
any other given encoding).
* Mail agents.
In theory, this would be very simple: POSIX provides the nl_langinfo function,
in such a way that
nl_langinfo (CODESET)
returns the encoding name. But the nl_langinfo function still does not exist
on some systems, and on those where it exists it returns unstandardized
variations of the encoding names, like (on Solaris) "PCK" for "Shift_JIS".
This library fixes these flaws and provides a function
const char * locale_charset (void);
It determines the current locale's character encoding, and canonicalizes it
into one of the canonical names listed in localcharset.h. The result must
not be freed; it is statically allocated. If the canonical name cannot be
determined, the result is a non-canonical name.
Installation:
As usual for GNU packages:
$ ./configure --prefix=/usr/local
$ make
$ make install
This library is used in
GNU coreutils
GNU gettext
GNU clisp
To integrate this library into your package:
- Either from this package. See file INTEGRATE.
- Or from gnulib. See
<https://www.gnu.org/software/gnulib/MODULES.html#module=localcharset>
Distribution:
The libcharset directory of
ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
Homepage:
https://haible.de/bruno/packages-libcharset.html
Bruno Haible <bruno@clisp.org>