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