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.
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 2, or (at your option)
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.
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, see <https://www.gnu.org/licenses/>. */
18 #ifndef _LOCALCHARSET_H
19 #define _LOCALCHARSET_H
27 /* Determine the current locale's character encoding, and canonicalize it
28 into one of the canonical names listed below.
29 The result must not be freed; it is statically allocated.
30 If the canonical name cannot be determined, the result is a non-canonical
32 extern const char * locale_charset (void);
34 /* About GNU canonical names for character encodings:
36 Every canonical name must be supported by GNU libiconv. Support by GNU libc
39 The name is case insensitive. Usually an upper case MIME charset name is
42 The current list of these GNU canonical names is:
44 name MIME? used by which systems
45 (darwin = Mac OS X, windows = native Windows)
47 ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
48 ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
49 ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
50 ISO-8859-3 Y glibc solaris cygwin
51 ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
52 ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
53 ISO-8859-6 Y glibc aix hpux solaris cygwin
54 ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
55 ISO-8859-8 Y glibc aix hpux osf solaris cygwin
56 ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin
57 ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
58 ISO-8859-14 glibc cygwin
59 ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
60 KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
61 KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
74 CP866 freebsd netbsd openbsd darwin dos
78 CP932 aix cygwin windows dos
80 CP949 osf darwin windows dos
88 CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows
95 GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin
96 EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
97 EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
98 EUC-TW glibc aix hpux irix osf solaris netbsd
99 BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin
100 BIG5-HKSCS glibc hpux solaris netbsd darwin
101 GBK glibc aix osf solaris freebsd darwin cygwin windows dos
102 GB18030 glibc hpux solaris freebsd netbsd darwin
103 SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
104 JOHAB glibc solaris windows
105 TIS-620 glibc aix hpux osf solaris cygwin
108 ARMSCII-8 glibc freebsd netbsd darwin
109 GEORGIAN-PS glibc cygwin
110 PT154 glibc netbsd cygwin
119 UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin
121 Note: Names which are not marked as being a MIME name should not be used in
122 Internet protocols for information interchange (mail, news, etc.).
124 Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
125 must understand both names and treat them as equivalent.
134 #endif /* _LOCALCHARSET_H */