README 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. LIBCHARSET - portable character set determination library
  2. This library provides a function which determines the character set / encoding
  3. of text in the currently selected locale (the LC_CTYPE locale facet).
  4. It is useful for portable programs which need to process text in other
  5. encodings and locales than the currently selected one. Possible uses:
  6. * Use of Unicode in POSIX compliant applications.
  7. * Conversion of text between the current locale's encoding and UTF-8 (or
  8. any other given encoding).
  9. * Mail agents.
  10. In theory, this would be very simple: The Single Unix Specification (SUSV2)
  11. provides the nl_langinfo function, in such a way that
  12. nl_langinfo (CODESET)
  13. returns the encoding name. But the nl_langinfo function still does not exist
  14. on some systems, and on those where it exists it returns unstandardized
  15. variations of the encoding names, like (on Solaris) "PCK" for "Shift_JIS".
  16. This library fixes these flaws and provides a function
  17. const char * locale_charset (void);
  18. It determines the current locale's character encoding, and canonicalizes it
  19. into one of the canonical names listed in config.charset. The result must
  20. not be freed; it is statically allocated. If the canonical name cannot be
  21. determined, the result is a non-canonical name.
  22. Installation:
  23. As usual for GNU packages:
  24. $ ./configure --prefix=/usr/local
  25. $ make
  26. $ make install
  27. This library is used in
  28. GNU sh-utils, fileutils, textutils
  29. GNU gettext
  30. GNU clisp
  31. To integrate this library into your package:
  32. See file INTEGRATE.
  33. Distribution:
  34. The libcharset directory of
  35. ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.8.tar.gz
  36. Homepage:
  37. http://www.haible.de/bruno/packages-libcharset.html
  38. Bruno Haible <bruno@clisp.org>