Added basic Chinese support
This commit is contained in:
parent
b104599baa
commit
e98f8ce1b1
@ -6,6 +6,7 @@ v0.71.2 16-Jan-2005
|
||||
charset:
|
||||
Changed rfc-2045 name x-mac to mac. Changed x-ibmpc to cp437.
|
||||
This allows rfc mime headers to show official names.
|
||||
Added some basic things to support Chinese.
|
||||
|
||||
libdiesel.a:
|
||||
Changed the maximum string length from 2560 to 4096 characters.
|
||||
|
@ -121,6 +121,7 @@ char *getchrs(int val)
|
||||
case FTNC_LATIN_5: return (char *)"LATIN-5 2";
|
||||
case FTNC_MAC: return (char *)"MAC 2";
|
||||
case FTNC_KOI8_R: return (char *)"KOI8-R 2";
|
||||
case FTNC_CP936: return (char *)"CP936 2";
|
||||
default: return (char *)"LATIN-1 2";
|
||||
}
|
||||
}
|
||||
@ -141,6 +142,7 @@ char *getchrsdesc(int val)
|
||||
case FTNC_LATIN_5: return (char *)"ISO 8859-5 (Turkish)";
|
||||
case FTNC_MAC: return (char *)"MacIntosh character set";
|
||||
case FTNC_KOI8_R: return (char *)"Unix codepage KOI8-R (Russian)";
|
||||
case FTNC_CP936: return (char *)"IBM codepage 936 (Chinese, GBK)";
|
||||
default: return (char *)"ERROR";
|
||||
}
|
||||
}
|
||||
|
@ -1318,3 +1318,4 @@ table mac mac
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
include russian.map
|
||||
include chinese.map
|
||||
|
26
lib/chinese.map
Normal file
26
lib/chinese.map
Normal file
@ -0,0 +1,26 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Original written by Martin Junius for Fidogate.
|
||||
#
|
||||
# Character set mapping table (to be compiled by charsetc)
|
||||
#
|
||||
|
||||
#
|
||||
# Chinese
|
||||
#
|
||||
alias gbk cp936
|
||||
alias gbk hz-gb-2312
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Channel map for translation CP936 codes to GBK codes
|
||||
# (Chinese language)
|
||||
#
|
||||
table cp936 gbk
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Channel map for translation GBK codes to CP936 codes
|
||||
# (Chinese language)
|
||||
#
|
||||
table koi8-r cp866
|
@ -429,7 +429,8 @@ struct icmp_filter {
|
||||
#define FTNC_CP852 9 /* IBM CP 852 (Czech, Latin-2) */
|
||||
#define FTNC_CP895 10 /* IBM CP 895 (Czech, Kamenicky) */
|
||||
#define FTNC_KOI8_R 11 /* Unix koi8-r */
|
||||
#define FTNC_MAXCHARS 11 /* Highest charset number */
|
||||
#define FTNC_CP936 12 /* IBM CP 936 (Chinese, GBK) */
|
||||
#define FTNC_MAXCHARS 12 /* Highest charset number */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -121,6 +121,7 @@ char *getrfcchrs(int val)
|
||||
case FTNC_LATIN_5: return (char *)"iso-8859-5";
|
||||
case FTNC_MAC: return (char *)"MAC 2";
|
||||
case FTNC_KOI8_R: return (char *)"koi8-r";
|
||||
case FTNC_CP936: return (char *)"hz-gb-2312";
|
||||
default: return (char *)"iso-8859-1";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user