jpayne@69: /* Determine a canonical name for the current locale's character encoding. jpayne@69: Copyright (C) 2000-2003, 2009-2019 Free Software Foundation, Inc. jpayne@69: This file is part of the GNU CHARSET Library. jpayne@69: jpayne@69: This program is free software; you can redistribute it and/or modify it jpayne@69: under the terms of the GNU Lesser General Public License as published jpayne@69: by the Free Software Foundation; either version 2, or (at your option) jpayne@69: any later version. jpayne@69: jpayne@69: This program is distributed in the hope that it will be useful, jpayne@69: but WITHOUT ANY WARRANTY; without even the implied warranty of jpayne@69: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU jpayne@69: Lesser General Public License for more details. jpayne@69: jpayne@69: You should have received a copy of the GNU Lesser General Public License jpayne@69: along with this program; if not, see . */ jpayne@69: jpayne@69: #ifndef _LOCALCHARSET_H jpayne@69: #define _LOCALCHARSET_H jpayne@69: jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: /* Determine the current locale's character encoding, and canonicalize it jpayne@69: into one of the canonical names listed below. jpayne@69: The result must not be freed; it is statically allocated. The result jpayne@69: becomes invalid when setlocale() is used to change the global locale, or jpayne@69: when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG jpayne@69: is changed; threads in multithreaded programs should not do this. jpayne@69: If the canonical name cannot be determined, the result is a non-canonical jpayne@69: name. */ jpayne@69: extern const char * locale_charset (void); jpayne@69: jpayne@69: /* About GNU canonical names for character encodings: jpayne@69: jpayne@69: Every canonical name must be supported by GNU libiconv. Support by GNU libc jpayne@69: is also desirable. jpayne@69: jpayne@69: The name is case insensitive. Usually an upper case MIME charset name is jpayne@69: preferred. jpayne@69: jpayne@69: The current list of these GNU canonical names is: jpayne@69: jpayne@69: name MIME? used by which systems jpayne@69: (darwin = Mac OS X, windows = native Windows) jpayne@69: jpayne@69: ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin jpayne@69: ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos jpayne@69: ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos jpayne@69: ISO-8859-3 Y glibc solaris cygwin jpayne@69: ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin jpayne@69: ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos jpayne@69: ISO-8859-6 Y glibc aix hpux solaris cygwin jpayne@69: ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos jpayne@69: ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos jpayne@69: ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos jpayne@69: ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin jpayne@69: ISO-8859-14 glibc cygwin jpayne@69: ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin jpayne@69: KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin jpayne@69: KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin jpayne@69: KOI8-T glibc jpayne@69: CP437 dos jpayne@69: CP775 dos jpayne@69: CP850 aix osf dos jpayne@69: CP852 dos jpayne@69: CP855 dos jpayne@69: CP856 aix jpayne@69: CP857 dos jpayne@69: CP861 dos jpayne@69: CP862 dos jpayne@69: CP864 dos jpayne@69: CP865 dos jpayne@69: CP866 freebsd netbsd openbsd darwin dos jpayne@69: CP869 dos jpayne@69: CP874 windows dos jpayne@69: CP922 aix jpayne@69: CP932 aix cygwin windows dos jpayne@69: CP943 aix zos jpayne@69: CP949 osf darwin windows dos jpayne@69: CP950 windows dos jpayne@69: CP1046 aix jpayne@69: CP1124 aix jpayne@69: CP1125 dos jpayne@69: CP1129 aix jpayne@69: CP1131 freebsd darwin jpayne@69: CP1250 windows jpayne@69: CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows jpayne@69: CP1252 aix windows jpayne@69: CP1253 windows jpayne@69: CP1254 windows jpayne@69: CP1255 glibc windows jpayne@69: CP1256 windows jpayne@69: CP1257 windows jpayne@69: GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos jpayne@69: EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin jpayne@69: EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos jpayne@69: EUC-TW glibc aix hpux irix osf solaris netbsd jpayne@69: BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos jpayne@69: BIG5-HKSCS glibc hpux solaris netbsd darwin jpayne@69: GBK glibc aix osf solaris freebsd darwin cygwin windows dos jpayne@69: GB18030 glibc hpux solaris freebsd netbsd darwin jpayne@69: SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin jpayne@69: JOHAB glibc solaris windows jpayne@69: TIS-620 glibc aix hpux osf solaris cygwin zos jpayne@69: VISCII Y glibc jpayne@69: TCVN5712-1 glibc jpayne@69: ARMSCII-8 glibc freebsd netbsd darwin jpayne@69: GEORGIAN-PS glibc cygwin jpayne@69: PT154 glibc netbsd cygwin jpayne@69: HP-ROMAN8 hpux jpayne@69: HP-ARABIC8 hpux jpayne@69: HP-GREEK8 hpux jpayne@69: HP-HEBREW8 hpux jpayne@69: HP-TURKISH8 hpux jpayne@69: HP-KANA8 hpux jpayne@69: DEC-KANJI osf jpayne@69: DEC-HANYU osf jpayne@69: UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos jpayne@69: jpayne@69: Note: Names which are not marked as being a MIME name should not be used in jpayne@69: Internet protocols for information interchange (mail, news, etc.). jpayne@69: jpayne@69: Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications jpayne@69: must understand both names and treat them as equivalent. jpayne@69: */ jpayne@69: jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: } jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: #endif /* _LOCALCHARSET_H */