localcharset.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /* Determine a canonical name for the current locale's character encoding.
  2. Copyright (C) 2000-2003, 2009-2018 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 it
  5. under the terms of the GNU Library General Public License as published
  6. by the Free Software Foundation; either version 2, 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 GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along 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.
  22. If the canonical name cannot be determined, the result is a non-canonical
  23. name. */
  24. extern const char * locale_charset (void);
  25. /* About GNU canonical names for character encodings:
  26. Every canonical name must be supported by GNU libiconv. Support by GNU libc
  27. is also desirable.
  28. The name is case insensitive. Usually an upper case MIME charset name is
  29. preferred.
  30. The current list of these GNU canonical names is:
  31. name MIME? used by which systems
  32. (darwin = Mac OS X, windows = native Windows)
  33. ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
  34. ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
  35. ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
  36. ISO-8859-3 Y glibc solaris cygwin
  37. ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
  38. ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
  39. ISO-8859-6 Y glibc aix hpux solaris cygwin
  40. ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
  41. ISO-8859-8 Y glibc aix hpux osf solaris cygwin
  42. ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin
  43. ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
  44. ISO-8859-14 glibc cygwin
  45. ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
  46. KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
  47. KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
  48. KOI8-T glibc
  49. CP437 dos
  50. CP775 dos
  51. CP850 aix osf dos
  52. CP852 dos
  53. CP855 dos
  54. CP856 aix
  55. CP857 dos
  56. CP861 dos
  57. CP862 dos
  58. CP864 dos
  59. CP865 dos
  60. CP866 freebsd netbsd openbsd darwin dos
  61. CP869 dos
  62. CP874 windows dos
  63. CP922 aix
  64. CP932 aix cygwin windows dos
  65. CP943 aix
  66. CP949 osf darwin windows dos
  67. CP950 windows dos
  68. CP1046 aix
  69. CP1124 aix
  70. CP1125 dos
  71. CP1129 aix
  72. CP1131 freebsd darwin
  73. CP1250 windows
  74. CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows
  75. CP1252 aix windows
  76. CP1253 windows
  77. CP1254 windows
  78. CP1255 glibc windows
  79. CP1256 windows
  80. CP1257 windows
  81. GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin
  82. EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
  83. EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
  84. EUC-TW glibc aix hpux irix osf solaris netbsd
  85. BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin
  86. BIG5-HKSCS glibc hpux solaris netbsd darwin
  87. GBK glibc aix osf solaris freebsd darwin cygwin windows dos
  88. GB18030 glibc hpux solaris freebsd netbsd darwin
  89. SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
  90. JOHAB glibc solaris windows
  91. TIS-620 glibc aix hpux osf solaris cygwin
  92. VISCII Y glibc
  93. TCVN5712-1 glibc
  94. ARMSCII-8 glibc freebsd netbsd darwin
  95. GEORGIAN-PS glibc cygwin
  96. PT154 glibc netbsd cygwin
  97. HP-ROMAN8 hpux
  98. HP-ARABIC8 hpux
  99. HP-GREEK8 hpux
  100. HP-HEBREW8 hpux
  101. HP-TURKISH8 hpux
  102. HP-KANA8 hpux
  103. DEC-KANJI osf
  104. DEC-HANYU osf
  105. UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin
  106. Note: Names which are not marked as being a MIME name should not be used in
  107. Internet protocols for information interchange (mail, news, etc.).
  108. Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
  109. must understand both names and treat them as equivalent.
  110. */
  111. #ifdef __cplusplus
  112. }
  113. #endif
  114. #endif /* _LOCALCHARSET_H */