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
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
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
40 The name is case insensitive. Usually an upper case MIME charset name is
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
75 CP866 freebsd netbsd openbsd darwin dos
79 CP932 aix cygwin windows dos
81 CP949 osf darwin windows dos
89 CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin 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
109 ARMSCII-8 glibc freebsd netbsd darwin
110 GEORGIAN-PS glibc cygwin
111 PT154 glibc netbsd cygwin
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. */
131 #endif /* _LOCALCHARSET_H */