/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2006, 2008-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>. */
#include <config.h>
/* Specification. */
#include "localcharset.h"
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET
# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */
#endif
#if defined _WIN32 && !defined __CYGWIN__
# define WINDOWS_NATIVE
# include <locale.h>
#endif
#if defined __EMX__
/* Assume EMX program runs on OS/2, even if compiled under DOS. */
# ifndef OS2
# define OS2
# endif
#endif
#if !defined WINDOWS_NATIVE
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
# else
# if 0 /* see comment regarding use of setlocale(), below */
# include <locale.h>
# endif
# endif
# ifdef __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# endif
#elif defined WINDOWS_NATIVE
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* For the use of setlocale() below, the Gnulib override in setlocale.c is
not needed; see the platform lists in setlocale_null.m4. */
# undef setlocale
#endif
#if defined OS2
# define INCL_DOS
# include <os2.h>
#endif
/* For MB_CUR_MAX_L */
#if defined DARWIN7
# include <xlocale.h>
#endif
#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2
/* On these platforms, we use a mapping from non-canonical encoding name
to GNU canonical encoding name. */
/* With glibc-2.1 or newer, we don't need any canonicalization,
because glibc has iconv and both glibc and libiconv support all
GNU canonical names directly. */
# if !((defined __GNU_LIBRARY__ && __GLIBC__ >= 2) || defined __UCLIBC__)
struct table_entry
{
const char alias[11+1];
const char canonical[11+1];
};
/* Table of platform-dependent mappings, sorted in ascending order. */
static const struct table_entry alias_table[] =
{
# if defined __FreeBSD__ /* FreeBSD */
/*{ "ARMSCII-8", "ARMSCII-8" },*/
{ "Big5", "BIG5" },
{ "C", "ASCII" },
/*{ "CP1131", "CP1131" },*/
/*{ "CP1251", "CP1251" },*/
/*{ "CP866", "CP866" },*/
/*{ "GB18030", "GB18030" },*/
/*{ "GB2312", "GB2312" },*/
/*{ "GBK", "GBK" },*/
/*{ "ISCII-DEV", "?" },*/
{ "ISO8859-1", "ISO-8859-1" },
{ "ISO8859-13", "ISO-8859-13" },
{ "ISO8859-15", "ISO-8859-15" },
{ "ISO8859-2", "ISO-8859-2" },
{ "ISO8859-5", "ISO-8859-5" },
{ "ISO8859-7", "ISO-8859-7" },
{ "ISO8859-9", "ISO-8859-9" },
/*{ "KOI8-R", "KOI8-R" },*/
/*{ "KOI8-U", "KOI8-U" },*/
{ "SJIS", "SHIFT_JIS" },
{ "US-ASCII", "ASCII" },
{ "eucCN", "GB2312" },
{ "eucJP", "EUC-JP" },
{ "eucKR", "EUC-KR" }
# define alias_table_defined
# endif
# if defined __NetBSD__ /* NetBSD */
{ "646", "ASCII" },
/*{ "ARMSCII-8", "ARMSCII-8" },*/
/*{ "BIG5", "BIG5" },*/
{ "Big5-HKSCS", "BIG5-HKSCS" },
/*{ "CP1251", "CP1251" },*/
/*{ "CP866", "CP866" },*/
/*{ "GB18030", "GB18030" },*/
/*{ "GB2312", "GB2312" },*/
{ "ISO8859-1", "ISO-8859-1" },
{ "ISO8859-13", "ISO-8859-13" },
{ "ISO8859-15", "ISO-8859-15" },
{ "ISO8859-2", "ISO-8859-2" },
{ "ISO8859-4", "ISO-8859-4" },
{ "ISO8859-5", "ISO-8859-5" },
{ "ISO8859-7", "ISO-8859-7" },
/*{ "KOI8-R", "KOI8-R" },*/
/*{ "KOI8-U", "KOI8-U" },*/
/*{ "PT154", "PT154" },*/
{ "SJIS", "SHIFT_JIS" },
{ "eucCN", "GB2312" },
{ "eucJP", "EUC-JP" },
{ "eucKR", "EUC-KR" },
{ "eucTW", "EUC-TW" }
# define alias_table_defined
# endif
# if defined __OpenBSD__ /* OpenBSD */
{ "646", "ASCII" },
{ "ISO8859-1", "ISO-8859-1" },
{ "ISO8859-13", "ISO-8859-13" },
{ "ISO8859-15", "ISO-8859-15" },
{ "ISO8859-2", "ISO-8859-2" },
{ "ISO8859-4", "ISO-8859-4" },
{ "ISO8859-5", "ISO-8859-5" },
{ "ISO8859-7", "ISO-8859-7" },
{ "US-ASCII", "ASCII" }
# define alias_table_defined
# endif
# if defined __APPLE__ && defined __MACH__ /* Mac OS X */
/* Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is
useless:
- It returns the empty string when LANG is set to a locale of the
form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
LC_CTYPE file.
- The environment variables LANG, LC_CTYPE, LC_ALL are not set by
the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
- The documentation says:
"... all code that calls BSD system routines should ensure
that the const *char parameters of these routines are in UTF-8
encoding. All BSD system functions expect their string
parameters to be in UTF-8 encoding and nothing else."
It also says
"An additional caveat is that string parameters for files,
paths, and other file-system entities must be in canonical
UTF-8. In a canonical UTF-8 Unicode string, all decomposable
characters are decomposed ..."
but this is not true: You can pass non-decomposed UTF-8 strings
to file system functions, and it is the OS which will convert
them to decomposed UTF-8 before accessing the file system.
- The Apple Terminal application displays UTF-8 by default.
- However, other applications are free to use different encodings:
- xterm uses ISO-8859-1 by default.
- TextEdit uses MacRoman by default.
We prefer UTF-8 over decomposed UTF-8-MAC because one should
minimize the use of decomposed Unicode. Unfortunately, through the
Darwin file system, decomposed UTF-8 strings are leaked into user
space nevertheless.
Then there are also the locales with encodings other than US-ASCII
and UTF-8. These locales can be occasionally useful to users (e.g.
when grepping through ISO-8859-1 encoded text files), when all their
file names are in US-ASCII.
*/
{ "ARMSCII-8", "ARMSCII-8" },
{ "Big5", "BIG5" },
{ "Big5HKSCS", "BIG5-HKSCS" },
{ "CP1131", "CP1131" },
{ "CP1251", "CP1251" },
{ "CP866", "CP866" },
{ "CP949", "CP949" },
{ "GB18030", "GB18030" },
{ "GB2312", "GB2312" },
{ "GBK", "GBK" },
/*{ "ISCII-DEV", "?" },*/
{ "ISO8859-1", "ISO-8859-1" },
{ "ISO8859-13", "ISO-8859-13" },
{ "ISO8859-15", "ISO-8859-15" },
{ "ISO8859-2", "ISO-8859-2" },
{ "ISO8859-4", "ISO-8859-4" },
{ "ISO8859-5", "ISO-8859-5" },
{ "ISO8859-7", "ISO-8859-7" },
{ "ISO8859-9", "ISO-8859-9" },
{ "KOI8-R", "KOI8-R" },
{ "KOI8-U", "KOI8-U" },
{ "PT154", "PT154" },
{ "SJIS", "SHIFT_JIS" },
{ "eucCN", "GB2312" },
{ "eucJP", "EUC-JP" },
{ "eucKR", "EUC-KR" }
# define alias_table_defined
# endif
# if defined _AIX /* AIX */
/*{ "GBK", "GBK" },*/
{ "IBM-1046", "CP1046" },
{ "IBM-1124", "CP1124" },
{
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
一、内容概况 QGIS是一个开源的、跨平台的地理信息系统(GIS)软件,用于浏览、编辑和分析地理空间数据,提供了一套丰富的功能,包括地图制作、空间分析、数据管理等。QGIS可以在Windows、Mac OS和Linux等操作系统上运行。 QGIS的跨平台编译需要一系列开源库的支持,本系列提供QGIS相关的编译成果。 本资源的内容为:基于Qt的iconv跨平台编译源码(含qt pro文件)。 二、使用人群 QGIS编译、QGIS跨平台编译的人员或研究者。 三、使用场景及目标 在Windows、Linux、MacOS环境下编译使用。 既可以支撑QGIS的跨平台编译工作,也可以进行iconv的二次研发。 四、其他说明 基于Qt Creator进行跨平台编译的iconv工程源码。包含有各类源码,以及配置好的Qt工程文件。 只需用Qt Creator程序打开pro文件,即可完成在Windows、Linux、MacOS等多环境下的跨平台编译。编译后会自动生成头文件、库文件、动态库等。 当前采用的版本为iconv-1.17,如果下载者,需要其他版本的iconv,请在评论区留言。
资源推荐
资源详情
资源评论
收起资源包目录
【QGIS跨平台编译】之【iconv跨平台编译】:源码及跨平台编译工程(支撑QGIS跨平台编译,以及二次研发) (299个子文件)
localcharset.c 39KB
relocatable.c 18KB
iconv.c 17KB
Makefile.Debug 26KB
translit.def 156KB
encodings.def 38KB
encodings_zos.def 17KB
encodings_dos.def 5KB
encodings_aix.def 3KB
encodings_extra.def 2KB
encodings_osf1.def 1KB
encodings_local.def 1KB
aliases_syshpux.gperf 8KB
aliases_sysaix.gperf 8KB
aliases_syssolaris.gperf 8KB
aliases_sysosf1.gperf 8KB
aliases.gperf 8KB
cns11643_inv.h 935KB
jisx0213.h 275KB
big5.h 256KB
cjk_variants.h 248KB
ksc5601.h 182KB
hkscs1999.h 182KB
gb2312.h 154KB
gbkext_inv.h 147KB
jisx0208.h 145KB
jisx0212.h 131KB
gb12345ext.h 105KB
translit.h 96KB
uhc_1.h 82KB
aliases_syshpux.h 77KB
aliases_syssolaris.h 76KB
aliases_sysaix.h 76KB
aliases_sysosf1.h 75KB
cns11643_5.h 74KB
aliases.h 71KB
gbkext2.h 69KB
cns11643_2.h 64KB
cns11643_15.h 63KB
cns11643_7.h 57KB
cns11643_3.h 56KB
cns11643_6.h 56KB
gbkext1.h 51KB
cns11643_1.h 51KB
config.h 50KB
uhc_2.h 47KB
isoir165ext.h 45KB
cns11643_4b.h 39KB
cp932ext.h 39KB
hkscs2001.h 33KB
hkscs2004.h 32KB
cns11643_4a.h 27KB
hkscs2008.h 21KB
big5_2003.h 20KB
iso2022_jp2.h 18KB
loop_unicode.h 17KB
iso2022_cnext.h 16KB
iso2022_jp3.h 15KB
loop_wchar.h 15KB
gb18030ext.h 14KB
gb18030.h 14KB
cp1255.h 13KB
iso2022_jpms.h 12KB
vietcomb.h 12KB
gb18030uni.h 12KB
tcvn.h 11KB
cp950.h 11KB
cp1258.h 10KB
utf7.h 10KB
johab_hangul.h 10KB
flags.h 10KB
aliases_zos.h 10KB
iconv.h 10KB
shift_jisx0213.h 10KB
converters.h 9KB
ebcdic1097.h 9KB
euc_jisx0213.h 9KB
ebcdic16804.h 8KB
iso2022_cn.h 8KB
ebcdic1164.h 8KB
ebcdic1130.h 8KB
cp864.h 8KB
ebcdic1166.h 7KB
ebcdic425.h 7KB
ebcdic1153.h 7KB
ebcdic1165.h 7KB
ebcdic870.h 7KB
koi8_u.h 7KB
koi8_ru.h 7KB
ebcdic12712.h 7KB
ebcdic1156.h 7KB
ebcdic905.h 7KB
cp932.h 7KB
mac_croatian.h 7KB
mac_romania.h 7KB
ebcdic1112.h 7KB
cp50221_0212_ext.h 7KB
mac_roman.h 7KB
mac_turkish.h 7KB
big5hkscs2008.h 7KB
共 299 条
- 1
- 2
- 3
资源评论
翰墨之道
- 粉丝: 3584
- 资源: 182
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- YOLOv8完整网络结构图详细visio
- LCD1602电子时钟程序
- 西北太平洋热带气旋【灾害风险统计】及【登陆我国次数评估】数据集-1980-2023
- 全球干旱数据集【自校准帕尔默干旱程度指数scPDSI】-190101-202312-0.5x0.5
- 基于Python实现的VAE(变分自编码器)训练算法源代码+使用说明
- 全球干旱数据集【标准化降水蒸发指数SPEI-12】-190101-202312-0.5x0.5
- C语言小游戏-五子棋-详细代码可运行
- 全球干旱数据集【标准化降水蒸发指数SPEI-03】-190101-202312-0.5x0.5
- spring boot aop记录修改前后的值demo
- 全球干旱数据集【标准化降水蒸发指数SPEI-01】-190101-202312-0.5x0.5
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功