localcharset.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /* Determine a canonical name for the current locale's character encoding.
  2. Copyright (C) 2000-2003, 2009-2021 Free Software Foundation, Inc.
  3. This file is part of the GNU CHARSET Library.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3, or (at your option)
  7. any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License along
  13. with this program; if not, see <https://www.gnu.org/licenses/>. */
  14. #ifndef _LOCALCHARSET_H
  15. #define _LOCALCHARSET_H
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /* Determine the current locale's character encoding, and canonicalize it
  20. into one of the canonical names listed below.
  21. The result must not be freed; it is statically allocated. The result
  22. becomes invalid when setlocale() is used to change the global locale, or
  23. when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
  24. is changed; threads in multithreaded programs should not do this.
  25. If the canonical name cannot be determined, the result is a non-canonical
  26. name. */
  27. extern const char * locale_charset (void);
  28. /* About GNU canonical names for character encodings:
  29. Every canonical name must be supported by GNU libiconv. Support by GNU libc
  30. is also desirable.
  31. The name is case insensitive. Usually an upper case MIME charset name is
  32. preferred.
  33. The current list of these GNU canonical names is:
  34. name MIME? used by which systems
  35. (darwin = Mac OS X, windows = native Windows)
  36. ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
  37. ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
  38. ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
  39. ISO-8859-3 Y glibc solaris cygwin
  40. ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
  41. ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
  42. ISO-8859-6 Y glibc aix hpux solaris cygwin
  43. ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
  44. ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos
  45. ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos
  46. ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
  47. ISO-8859-14 glibc cygwin
  48. ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
  49. KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
  50. KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
  51. KOI8-T glibc
  52. CP437 dos
  53. CP775 dos
  54. CP850 aix osf dos
  55. CP852 dos
  56. CP855 dos
  57. CP856 aix
  58. CP857 dos
  59. CP861 dos
  60. CP862 dos
  61. CP864 dos
  62. CP865 dos
  63. CP866 freebsd netbsd openbsd darwin dos
  64. CP869 dos
  65. CP874 windows dos
  66. CP922 aix
  67. CP932 aix cygwin windows dos
  68. CP943 aix zos
  69. CP949 osf darwin windows dos
  70. CP950 windows dos
  71. CP1046 aix
  72. CP1124 aix
  73. CP1125 dos
  74. CP1129 aix
  75. CP1131 freebsd darwin
  76. CP1250 windows
  77. CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows
  78. CP1252 aix windows
  79. CP1253 windows
  80. CP1254 windows
  81. CP1255 glibc windows
  82. CP1256 windows
  83. CP1257 windows
  84. GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos
  85. EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
  86. EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos
  87. EUC-TW glibc aix hpux irix osf solaris netbsd
  88. BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos
  89. BIG5-HKSCS glibc hpux solaris netbsd darwin
  90. GBK glibc aix osf solaris freebsd darwin cygwin windows dos
  91. GB18030 glibc hpux solaris freebsd netbsd darwin
  92. SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
  93. JOHAB glibc solaris windows
  94. TIS-620 glibc aix hpux osf solaris cygwin zos
  95. VISCII Y glibc
  96. TCVN5712-1 glibc
  97. ARMSCII-8 glibc freebsd netbsd darwin
  98. GEORGIAN-PS glibc cygwin
  99. PT154 glibc netbsd cygwin
  100. HP-ROMAN8 hpux
  101. HP-ARABIC8 hpux
  102. HP-GREEK8 hpux
  103. HP-HEBREW8 hpux
  104. HP-TURKISH8 hpux
  105. HP-KANA8 hpux
  106. DEC-KANJI osf
  107. DEC-HANYU osf
  108. UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos
  109. Note: Names which are not marked as being a MIME name should not be used in
  110. Internet protocols for information interchange (mail, news, etc.).
  111. Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
  112. must understand both names and treat them as equivalent.
  113. */
  114. #ifdef __cplusplus
  115. }
  116. #endif
  117. #endif /* _LOCALCHARSET_H */