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