Bug 180555 - remove unused parts of mozilla/lib (not part of build)
git-svn-id: svn://10.0.0.236/trunk@154120 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
93b98445ab
commit
df66b46215
@ -1,80 +0,0 @@
|
||||
#! gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
#
|
||||
|
||||
DEPTH = ..
|
||||
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
DIRS = layout libcgi libi18n libmisc
|
||||
|
||||
ifndef NO_UNIX_LDAP
|
||||
DIRS += ldap
|
||||
endif
|
||||
|
||||
ifdef MOZ_MAIL_NEWS
|
||||
DIRS += libmsg
|
||||
else
|
||||
ifdef MOZ_MAIL_COMPOSE
|
||||
DIRS += mailto
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_NEO
|
||||
DIRS += libneo
|
||||
endif
|
||||
|
||||
DIRS += libparse xlate xp
|
||||
|
||||
DIRS += libmime
|
||||
|
||||
ifdef MOZ_MAIL_NEWS
|
||||
DIRS += libaddr
|
||||
endif
|
||||
|
||||
DIRS += htmldlgs
|
||||
|
||||
ifndef NO_LAYERS
|
||||
DIRS += liblayer
|
||||
endif
|
||||
|
||||
DIRS += libmocha libstyle
|
||||
|
||||
ifdef DOM
|
||||
DIRS += libdom
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
DIRS += libcnv
|
||||
endif
|
||||
|
||||
DIRS += libpics
|
||||
|
||||
DIRS += mariner
|
||||
|
||||
DIRS += libpwcac
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
|
||||
|
||||
# This is a kludge so that running "make netscape-us" in this directory
|
||||
# will rebuild the subdirectories, and then relink ../../cmd/xfe/netscape-us
|
||||
#
|
||||
junk=export libs install
|
||||
netscape-us netscape-export nav-us nav-export netscape-us.pure netscape-export.pure: $(junk)
|
||||
cd $(DEPTH)/cmd/xfe; $(MAKE) $@
|
||||
@ -1,85 +0,0 @@
|
||||
#! gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
#
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
DIRS = layout libcgi libi18n libmisc
|
||||
|
||||
ifndef NO_UNIX_LDAP
|
||||
DIRS += ldap
|
||||
endif
|
||||
|
||||
ifdef MOZ_MAIL_NEWS
|
||||
DIRS += libmsg
|
||||
else
|
||||
ifdef MOZ_MAIL_COMPOSE
|
||||
DIRS += mailto
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_NEO
|
||||
DIRS += libneo
|
||||
endif
|
||||
|
||||
DIRS += libparse xlate xp
|
||||
|
||||
DIRS += libmime
|
||||
|
||||
ifdef MOZ_MAIL_NEWS
|
||||
DIRS += libaddr
|
||||
endif
|
||||
|
||||
DIRS += htmldlgs
|
||||
|
||||
ifndef NO_LAYERS
|
||||
DIRS += liblayer
|
||||
endif
|
||||
|
||||
DIRS += libmocha libstyle
|
||||
|
||||
ifdef DOM
|
||||
DIRS += libdom
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
DIRS += libcnv
|
||||
endif
|
||||
|
||||
DIRS += libpics
|
||||
|
||||
DIRS += mariner
|
||||
|
||||
DIRS += libpwcac
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
# This is a kludge so that running "make netscape-us" in this directory
|
||||
# will rebuild the subdirectories, and then relink ../../cmd/xfe/netscape-us
|
||||
#
|
||||
junk=export libs install
|
||||
netscape-us netscape-export nav-us nav-export netscape-us.pure netscape-export.pure: $(junk)
|
||||
cd $(DEPTH)/cmd/xfe; $(MAKE) $@
|
||||
Binary file not shown.
@ -1,74 +0,0 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
|
||||
DEPTH = ../..
|
||||
|
||||
MODULE = i18n
|
||||
LIBRARY_NAME = i18n
|
||||
|
||||
DIRS = unicode
|
||||
|
||||
CSRCS = autokr.c \
|
||||
autocvt.c \
|
||||
b52cns.c \
|
||||
cns2b5.c \
|
||||
cvchcode.c \
|
||||
detectu2.c \
|
||||
euc2jis.c \
|
||||
euc2sjis.c \
|
||||
euckr2is.c \
|
||||
is2euckr.c \
|
||||
intl_csi.c \
|
||||
jis2oth.c \
|
||||
net_junk.c \
|
||||
nscstr.c \
|
||||
metatag.c \
|
||||
sjis2euc.c \
|
||||
sjis2jis.c \
|
||||
ugen.c \
|
||||
ugendata.c \
|
||||
ucs2.c \
|
||||
umap.c \
|
||||
unicvt.c \
|
||||
uscan.c \
|
||||
fontencd.c \
|
||||
csnamefn.c \
|
||||
csnametb.c \
|
||||
sbconvtb.c \
|
||||
acptlang.c \
|
||||
csstrlen.c \
|
||||
sblower.c \
|
||||
dblower.c \
|
||||
kinsokud.c \
|
||||
kinsokuf.c \
|
||||
katakana.c \
|
||||
vietnam.c \
|
||||
country.c \
|
||||
$(NULL)
|
||||
|
||||
REQUIRES = i18n dbm nspr img util layer pref js
|
||||
|
||||
CSRCS += doc_ccc.c fe_ccc.c intlcomp.c mime2fun.c
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
|
||||
DEFINES += -DHAS_FE
|
||||
|
||||
$(LIBRARY): $(OBJS)
|
||||
|
||||
@ -1,79 +0,0 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = i18n
|
||||
LIBRARY_NAME = i18n
|
||||
|
||||
DIRS = unicode
|
||||
|
||||
CSRCS = autokr.c \
|
||||
autocvt.c \
|
||||
b52cns.c \
|
||||
cns2b5.c \
|
||||
cvchcode.c \
|
||||
detectu2.c \
|
||||
euc2jis.c \
|
||||
euc2sjis.c \
|
||||
euckr2is.c \
|
||||
is2euckr.c \
|
||||
intl_csi.c \
|
||||
jis2oth.c \
|
||||
net_junk.c \
|
||||
nscstr.c \
|
||||
metatag.c \
|
||||
sjis2euc.c \
|
||||
sjis2jis.c \
|
||||
ugen.c \
|
||||
ugendata.c \
|
||||
ucs2.c \
|
||||
umap.c \
|
||||
unicvt.c \
|
||||
uscan.c \
|
||||
fontencd.c \
|
||||
csnamefn.c \
|
||||
csnametb.c \
|
||||
sbconvtb.c \
|
||||
acptlang.c \
|
||||
csstrlen.c \
|
||||
sblower.c \
|
||||
dblower.c \
|
||||
kinsokud.c \
|
||||
kinsokuf.c \
|
||||
katakana.c \
|
||||
vietnam.c \
|
||||
country.c \
|
||||
$(NULL)
|
||||
|
||||
REQUIRES = i18n dbm img util layer pref js
|
||||
|
||||
CSRCS += doc_ccc.c fe_ccc.c intlcomp.c mime2fun.c
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -DHAS_FE
|
||||
|
||||
$(LIBRARY): $(OBJS)
|
||||
|
||||
@ -1,166 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* acptlang.c */
|
||||
/* File implement Accept-Language and Accept-Charset */
|
||||
|
||||
#include "intlpriv.h"
|
||||
#include "prefapi.h"
|
||||
|
||||
static char *accept_language = NULL;
|
||||
static const char *pref_accept_language = "intl.accept_languages";
|
||||
|
||||
static char *accept_charset = NULL;
|
||||
static const char *pref_accept_charset = "intl.accept_charsets";
|
||||
|
||||
|
||||
PRIVATE void FilterOutHumanReadableText(char* str)
|
||||
{
|
||||
if(NULL == str)
|
||||
return;
|
||||
/*
|
||||
Currently, we only do this on Window build because
|
||||
1. I only know window have this problem
|
||||
2. Macintosh should be ok since we do not store this in this
|
||||
format on the Mac
|
||||
3. I don't know about UNIX for now.
|
||||
|
||||
We probably need to build this for all the platform since
|
||||
the preference will be for xp so a window pref could be
|
||||
used on Mac and UNIX
|
||||
|
||||
*/
|
||||
#if ((defined XP_WIN) || (defined XP_UNIX) || (defined XP_OS2))
|
||||
if(strchr(str, '[') != NULL) /* Searching [ to determinate wheather */
|
||||
/* This is "Window-Style" AcceptLang Pref */
|
||||
{
|
||||
int state= 0;
|
||||
char *in, *out;
|
||||
/*
|
||||
State Machine:
|
||||
|
||||
State 0 State 1 State 2
|
||||
Hit [ Goto State 1 Copy in (Err!) Emit [,] Goto State 1
|
||||
Hit ] Ignore in Goto State 2 ignore In
|
||||
Else Ignore in Copy in ignore In
|
||||
|
||||
Sample data:
|
||||
in: AAA BBB [abb-a], CC DD [ee-ff]
|
||||
state: 0000000001111112222222221111112
|
||||
action: abb-a ,ee-ff \0
|
||||
Out: abb-a,ee-ff
|
||||
|
||||
|
||||
*/
|
||||
for(state=0, in=out=str; *in!=0; in++)
|
||||
{
|
||||
switch(state)
|
||||
{
|
||||
case 1: /* Between [ and ] */
|
||||
if(*in == ']') /* hit ] */
|
||||
state = 2; /* Change state to 2 */
|
||||
else
|
||||
*out++ = *in; /* Copy text between [ and ] */
|
||||
break;
|
||||
case 2: /* Before hit not-first [ */
|
||||
if(*in == '[') /* hit the not-first [ */
|
||||
{
|
||||
state = 1; /* Change state to 1 */
|
||||
*out++ = ','; /* Need to copy , */
|
||||
}
|
||||
break;
|
||||
case 0: /* Before hit first [ */
|
||||
default:
|
||||
if(*in == '[') /* hit first [ */
|
||||
state = 1; /* Change state to 1 */
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
*out = '\0'; /* NULL terminate output */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* callback routine invoked by prefapi when the pref value changes */
|
||||
/* According to the comment in mime2fun.c
|
||||
Win16 build fails if PR_CALLBACK is declared as static
|
||||
So I change it to MODULE_PRIVATE
|
||||
*/
|
||||
|
||||
MODULE_PRIVATE int PR_CALLBACK intl_SetAcceptLanguage(const char * newpref, void * data)
|
||||
{
|
||||
if (accept_language) {
|
||||
XP_FREE(accept_language);
|
||||
accept_language = NULL;
|
||||
}
|
||||
|
||||
PREF_CopyCharPref(pref_accept_language, &accept_language);
|
||||
FilterOutHumanReadableText(accept_language);
|
||||
return PREF_NOERROR;
|
||||
}
|
||||
|
||||
/* INTL_GetAcceptLanguage() */
|
||||
/* return the AcceptLanguage from XP Preference */
|
||||
/* this should be a C style NULL terminated string */
|
||||
PUBLIC char* INTL_GetAcceptLanguage()
|
||||
{
|
||||
if (accept_language == NULL)
|
||||
{
|
||||
PREF_CopyCharPref(pref_accept_language, &accept_language);
|
||||
|
||||
if (accept_language)
|
||||
PREF_RegisterCallback(pref_accept_language, intl_SetAcceptLanguage, NULL);
|
||||
}
|
||||
FilterOutHumanReadableText(accept_language);
|
||||
|
||||
return accept_language;
|
||||
}
|
||||
|
||||
/* callback routine invoked by prefapi when the pref value changes */
|
||||
/* According to the comment in mime2fun.c
|
||||
Win16 build fails if PR_CALLBACK is declared as static
|
||||
So I change it to MODULE_PRIVATE
|
||||
*/
|
||||
MODULE_PRIVATE int PR_CALLBACK intl_SetAcceptCharset(const char * newpref, void * data)
|
||||
{
|
||||
if (accept_charset) {
|
||||
XP_FREE(accept_charset);
|
||||
accept_charset = NULL;
|
||||
}
|
||||
|
||||
PREF_CopyCharPref(pref_accept_charset, &accept_charset);
|
||||
FilterOutHumanReadableText(accept_charset);
|
||||
return PREF_NOERROR;
|
||||
}
|
||||
|
||||
/* INTL_GetAcceptCharset() */
|
||||
/* return the AcceptCharset from XP Preference */
|
||||
/* this should be a C style NULL terminated string */
|
||||
PUBLIC char* INTL_GetAcceptCharset()
|
||||
{
|
||||
if (accept_charset == NULL)
|
||||
{
|
||||
PREF_CopyCharPref(pref_accept_charset, &accept_charset);
|
||||
|
||||
if (accept_charset)
|
||||
PREF_RegisterCallback(pref_accept_charset, intl_SetAcceptCharset, NULL);
|
||||
}
|
||||
|
||||
return accept_charset;
|
||||
}
|
||||
|
||||
@ -1,336 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* autodetect.c */
|
||||
|
||||
/*
|
||||
* CODESET 1st Byte 2nd Byte 3rd Byte
|
||||
* JIS 0x21-0x7E 0x21-0x7E n/a
|
||||
* SJIS 0xA1-0xDF n/a n/a
|
||||
* 0x81-0x9F 0x40-0xFC n/a
|
||||
* 0xE0-0xEF 0x40-0xFC n/a
|
||||
* EUCJP 0x8E (SS2) 0xA1-0xDF n/a
|
||||
* 0xA1-0xFE 0xA1-0xFE n/a
|
||||
* 0x8F (SS3) 0xA1-0xFE 0xA1-0xFE
|
||||
* Invalid 7F,80,A0,FF
|
||||
*/
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
#define ALLOW_NBSP 1
|
||||
|
||||
/*
|
||||
* JIS X 0201-Roman ESC ( J
|
||||
* Half-width Katakana ESC ( I
|
||||
* JIS X 0208-1978 ESC $ @
|
||||
* JIS X 0208-1983 ESC $ B
|
||||
* JIS X 0212-1990 ESC $ ( D
|
||||
*/
|
||||
#define IsJISEscSeq(cp, len) \
|
||||
((cp[0] == ESC) && ((len) > 2) && ( \
|
||||
((cp[1] == '$') && (cp[2] == 'B')) || \
|
||||
((cp[1] == '$') && (cp[2] == '@')) || \
|
||||
((cp[1] == '(') && (cp[2] == 'J')) || \
|
||||
((cp[1] == '(') && (cp[2] == 'I')) || \
|
||||
(((len) > 3) && (cp[1] == '$') && (cp[2] == '(') && (cp[3] == 'D')) ) )
|
||||
|
||||
#define IsRoman(c) ((c) < 0x80)
|
||||
#define IsSJIS2ndByte(c) (((c) > 0x3F) && ((c) < 0xFD))
|
||||
#define IsLoSJIS2ndByte(c) (((c) > 0x3F) && ((c) < 0xA1))
|
||||
#define IsHiSJIS2ndByte(c) (((c) > 0xA0) && ((c) < 0xFD))
|
||||
#define IsEUCJPKana(b1) (((b1) > 0xA0) && ((b1) < 0xE0))
|
||||
#define IsEUCJPKanji(b1or2) (((b1or2) > 0xA0) && ((b1or2) < 0xFF))
|
||||
|
||||
#define YES 1
|
||||
#define NO 0
|
||||
#define MAYBE -1
|
||||
|
||||
PRIVATE int
|
||||
isSJIS(const unsigned char *cp, int32 len)
|
||||
{
|
||||
while (len) {
|
||||
if (IsRoman(*cp)) {
|
||||
cp++, len--;
|
||||
} else if (*cp == 0x80) { /* illegal SJIS 1st byte */
|
||||
return NO;
|
||||
} else if ((*cp < 0xA0)) { /* byte 1 of 2byte SJIS 1st range */
|
||||
if (len > 1) {
|
||||
if (IsSJIS2ndByte(cp[1])) {
|
||||
if ((*cp != 0x8E && *cp != 0x8F) || (*(cp+1) <= 0xA0))
|
||||
return YES;
|
||||
cp += 2, len -= 2; /* valid 2 byte SJIS */
|
||||
} else {
|
||||
return NO; /* invalid SJIS 2nd byte */
|
||||
}
|
||||
} else
|
||||
break; /* buffer ended w/1of2 byte SJIS */
|
||||
} else if (*cp == 0xA0) { /* illegal EUCJP byte */
|
||||
#if ALLOW_NBSP
|
||||
cp++, len--; /* allow nbsp */
|
||||
#endif
|
||||
} else if (*cp < 0xE0) { /* SJIS half-width kana */
|
||||
cp++, len--;
|
||||
} else if (*cp < 0xF0) { /* byte 1 of 2byte SJIS 2nd range */
|
||||
if (len > 1) {
|
||||
if (IsSJIS2ndByte(cp[1])) {
|
||||
cp += 2, len -= 2; /* valid 2 byte SJIS */
|
||||
} else {
|
||||
return NO; /* invalid SJIS */
|
||||
}
|
||||
} else
|
||||
break; /* buffer ended w/1of2 byte SJIS */
|
||||
} else {
|
||||
return NO; /* invalid SJIS 1st byte */
|
||||
}
|
||||
}
|
||||
return MAYBE; /* No illegal SJIS values found */
|
||||
}
|
||||
|
||||
PRIVATE int
|
||||
isEUCJP(const unsigned char *cp, int32 len)
|
||||
{
|
||||
while (len) {
|
||||
if (IsRoman(*cp)) { /* Roman */
|
||||
cp++, len--;
|
||||
} else if (*cp == SS2) { /* EUCJP JIS201 half-width kana */
|
||||
if (len > 1) {
|
||||
if (IsEUCJPKana(cp[1]))
|
||||
cp += 2, len -= 2; /* valid half-width kana */
|
||||
else
|
||||
return NO; /* invalid 2of3 byte EUC */
|
||||
} else
|
||||
break; /* buffer ended w/1of2 byte EUC */
|
||||
} else if (*cp == SS3) { /* EUCJP JIS212 */
|
||||
if (len > 1) {
|
||||
if (IsEUCJPKanji(cp[1])) {
|
||||
if (len > 2) {
|
||||
if (IsEUCJPKanji(cp[2]))
|
||||
cp += 2, len -= 2; /* valid 3 byte EUCJP */
|
||||
else
|
||||
return NO; /* invalid 3of3 byte EUCJP */
|
||||
} else
|
||||
break; /* buffer ended w/2of3 byte EUCJP */
|
||||
} else
|
||||
return NO; /* invalid 2of3 byte EUCJP */
|
||||
} else
|
||||
break; /* buffer ended w/1of3 byte EUCJP */
|
||||
} else if (*cp == 0xA0) { /* illegal EUCJP byte */
|
||||
#if ALLOW_NBSP
|
||||
cp++, len--; /* allow nbsp */
|
||||
#else
|
||||
return NO;
|
||||
#endif
|
||||
} else if (*cp < 0xF0) { /* EUCJP JIS208 (overlaps SJIS) */
|
||||
if (len > 1) {
|
||||
if (IsEUCJPKanji(cp[1]))
|
||||
cp += 2, len -= 2; /* valid 2 byte EUCJP */
|
||||
else
|
||||
return NO; /* invalid 2of2 byte EUCJP */
|
||||
} else
|
||||
break; /* buffer ended w/1of2 byte EUCJP */
|
||||
} else if (*cp < 0xFF) { /* EUCJP JIS208 only: */
|
||||
if (len > 1) {
|
||||
if (IsEUCJPKanji(cp[1]))
|
||||
return YES; /* valid 2 byte EUCJP, invalid SJIS */
|
||||
else
|
||||
return NO; /* invalid 2of2 byte EUCJP */
|
||||
} else
|
||||
break; /* buffer ended w/1of2 byte EUCJP */
|
||||
} else {
|
||||
return NO; /* invalid EUCJP 1st byte: 0xFF */
|
||||
}
|
||||
}
|
||||
return MAYBE;
|
||||
}
|
||||
|
||||
MODULE_PRIVATE int16
|
||||
intl_detect_JCSID (uint16 defaultCSID, const unsigned char *buf, int32 len)
|
||||
{
|
||||
register const unsigned char *cp = buf;
|
||||
int sjisFlag;
|
||||
int eucjpFlag;
|
||||
|
||||
/* JIS is 7bit. Scan to end of 7bit data or legitimate JIS ESC sequence. */
|
||||
while (len && (IsRoman(*cp) || (*cp == 0xA0))) { /* allow nbsp */
|
||||
if (IsJISEscSeq(cp, len))
|
||||
return CS_JIS;
|
||||
cp++, len--;
|
||||
}
|
||||
|
||||
/* If len > 0, must be either SJIS or EUC because there's 8bit data */
|
||||
while (len) {
|
||||
if (*cp == 0x80) {
|
||||
return CS_DEFAULT;/* illegal byte1 (SJIS & EUCJP) */
|
||||
}
|
||||
if (*cp < 0x8E)
|
||||
return CS_SJIS; /* Illegal EUCJP 1st byte */
|
||||
if (*cp == 0xA0) {
|
||||
#if ALLOW_NBSP
|
||||
cp++; len--;
|
||||
continue; /* allow nbsp */
|
||||
#else
|
||||
return CS_DEFAULT;/* illegal byte1 (SJIS & EUCJP) */
|
||||
#endif
|
||||
}
|
||||
if ( (*cp > 0xEF) && (*cp < 0xFF) ) /* illegal SJIS 1st byte */
|
||||
return CS_EUCJP;
|
||||
if (*cp == 0xFF) {
|
||||
return CS_DEFAULT;/* illegal byte1 (SJIS & EUCJP) */
|
||||
}
|
||||
|
||||
/* At this point. 1st byte is 0x8E, 0x8F, or 0xA1-0xEF. */
|
||||
/* If 1st Byte is 0xE0-0xEF inclusive, then it's 2byte SJIS or EUC */
|
||||
if ((*cp > 0xDF) && (*cp < 0xF0)) {
|
||||
if (len > 1) {
|
||||
if (cp[1] < 0x41) { /* illegal byte2 (SJIS & EUCJP) */
|
||||
return CS_DEFAULT;
|
||||
}
|
||||
if (cp[1] < 0xA1)
|
||||
return CS_SJIS; /* Illegal EUCJP 2nd byte */
|
||||
if (cp[1] > 0xFC)
|
||||
return CS_EUCJP; /* illegal SJIS 2nd byte */
|
||||
cp += 2, len -= 2; /* Skip 2 byte character */
|
||||
|
||||
/* Gobble up single byte characters and continue outer loop */
|
||||
while (len && IsRoman(*cp)) {
|
||||
cp++, len--;
|
||||
}
|
||||
continue;
|
||||
} else {
|
||||
len = 0;
|
||||
break; /* No more chars in buffer */
|
||||
}
|
||||
}
|
||||
/* 1st Byte is 0xA1-DF inclusive:
|
||||
* 1byte SJIS kana or 1of2 byte SJIS or EUC
|
||||
*/
|
||||
break; /* break and handle ambiguous cases */
|
||||
}
|
||||
|
||||
if (len) {
|
||||
eucjpFlag = isEUCJP(cp, len);
|
||||
if (YES == eucjpFlag)
|
||||
return CS_EUCJP;
|
||||
|
||||
sjisFlag = isSJIS(cp, len);
|
||||
if (YES == sjisFlag)
|
||||
return CS_SJIS;
|
||||
|
||||
/* Neither one is YES, look at NO : MAYBE Pair */
|
||||
if ((NO == eucjpFlag) && (MAYBE == sjisFlag))
|
||||
return CS_SJIS;
|
||||
if ((MAYBE == eucjpFlag) && (NO == sjisFlag))
|
||||
return CS_EUCJP;
|
||||
}
|
||||
|
||||
/* Some servers relied upon the previous Nav3.0 default for ambiguous SJIS/EUC encoding. */
|
||||
#define USE_ACKBAR_LOGIC 1
|
||||
|
||||
/* Now, both are NO or both are MAYBE, look at default */
|
||||
if (len) { /* Must be ambiguous -- EUC or SJIS */
|
||||
#if USE_ACKBAR_LOGIC
|
||||
|
||||
#ifdef XP_MAC
|
||||
defaultCSID = CS_SJIS_AUTO; /* simulate Akbar old charset hints */
|
||||
#else
|
||||
defaultCSID = CS_JIS;
|
||||
#endif
|
||||
if (defaultCSID == CS_SJIS) {
|
||||
eucjpFlag = isEUCJP(cp, len);
|
||||
if (eucjpFlag == YES)
|
||||
return CS_EUCJP;
|
||||
else
|
||||
return CS_SJIS;
|
||||
} else if (defaultCSID == CS_EUCJP) {
|
||||
sjisFlag = isSJIS(cp, len);
|
||||
if (sjisFlag == YES)
|
||||
return CS_SJIS;
|
||||
else
|
||||
return CS_EUCJP;
|
||||
} else { /* default is JIS */
|
||||
sjisFlag = isSJIS(cp, len);
|
||||
if (sjisFlag == YES)
|
||||
return CS_SJIS;
|
||||
eucjpFlag = isEUCJP(cp, len);
|
||||
if (eucjpFlag == YES)
|
||||
return CS_EUCJP;
|
||||
if (sjisFlag == NO) {
|
||||
if (eucjpFlag != NO) /* SJIS-NO, EUCJP-MAYBE */
|
||||
return CS_EUCJP;
|
||||
} else {
|
||||
if (eucjpFlag == NO) /* SJIS-MAYBE, EUCJP-NO */
|
||||
return CS_SJIS;
|
||||
else { /* both MAYBE */
|
||||
return CS_EUCJP; /* have to pick one... */
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (CS_SJIS == defaultCSID) {
|
||||
if (MAYBE == sjisFlag)
|
||||
return CS_SJIS;
|
||||
} else if (CS_EUCJP == defaultCSID) {
|
||||
if (MAYBE == eucjpFlag)
|
||||
return CS_EUCJP;
|
||||
} else { /* default is JIS */
|
||||
if ((MAYBE == eucjpFlag) && (MAYBE == sjisFlag)) /* pick one- EUC */
|
||||
return CS_EUCJP;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return CS_ASCII; /* Could be any of the 3... */
|
||||
}
|
||||
|
||||
/* Auto Detect Japanese Char Code Conversion */
|
||||
MODULE_PRIVATE unsigned char *
|
||||
autoJCCC (CCCDataObject obj, const unsigned char *s, int32 l)
|
||||
{
|
||||
int16 doc_csid = 0;
|
||||
uint16 detected_doc_csid;
|
||||
|
||||
/* try to determine doc Japanese CSID. */
|
||||
doc_csid = intl_detect_JCSID((uint16)(INTL_GetCCCDefaultCSID(obj)&~CS_AUTO),
|
||||
(const unsigned char *) s,l);
|
||||
if (doc_csid == CS_ASCII) { /* return s unconverted and */
|
||||
INTL_SetCCCLen(obj, l);
|
||||
return (unsigned char *)s; /* autodetect next block of stream data */
|
||||
}
|
||||
if (doc_csid == CS_DEFAULT) { /* found unexpected chars */
|
||||
doc_csid = INTL_GetCCCDefaultCSID(obj) & ~CS_AUTO;
|
||||
detected_doc_csid = CS_DEFAULT;
|
||||
} else {
|
||||
detected_doc_csid = doc_csid | CS_AUTO;
|
||||
}
|
||||
/* Setup converter function for success streams data blocks */
|
||||
(void) INTL_GetCharCodeConverter(doc_csid, INTL_GetCCCToCSID(obj), obj);
|
||||
INTL_CallCCCReportAutoDetect(obj, detected_doc_csid);
|
||||
|
||||
/* If no conversion needed, change put_block module for successive
|
||||
* data blocks. For current data block, return unmodified buffer.
|
||||
*/
|
||||
if (INTL_GetCCCCvtfunc(obj) == NULL) {
|
||||
INTL_SetCCCLen(obj, l);
|
||||
return((unsigned char *) s);
|
||||
}
|
||||
/* For initial block, must call converter directly. Success calls
|
||||
* to the converter will be called directly from net_CharCodeConv()
|
||||
*/
|
||||
return (unsigned char *)(INTL_GetCCCCvtfunc(obj)) (obj, (const unsigned char *)s, l);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,80 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* autokr.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
#include "xp.h"
|
||||
#include "libi18n.h"
|
||||
|
||||
MODULE_PRIVATE int16 intl_detect_KCSID( uint16 defaultCSID, const unsigned char *buf, int32 len )
|
||||
{
|
||||
register const unsigned char *cp = buf;
|
||||
/* CS_2022_KR is 7bit. Scan to end of 7bit data or legitimate KOREAN ESC sequence. */
|
||||
while( len && !( *cp & 0x80 ) ){
|
||||
/* CS_2022_KR ESC $ ) C */
|
||||
if(( cp[0] == ESC && len > 3 && ( cp[1] == '$' && cp[2] == ')' && cp[3] == 'C' ) ) ||
|
||||
(SI == *cp) || (SO == *cp) )
|
||||
return CS_2022_KR;
|
||||
cp++, len--;
|
||||
}
|
||||
|
||||
if( len > 0 ) return CS_KSC_8BIT; /* it is not Roman */
|
||||
|
||||
return CS_ASCII; /* Could be any of the 3... */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Auto Detect Korean Char Code Conversion : jliu */
|
||||
MODULE_PRIVATE unsigned char *
|
||||
autoKCCC (CCCDataObject obj, const unsigned char *s, int32 l)
|
||||
{
|
||||
int16 doc_csid = 0;
|
||||
|
||||
/* Use 1st stream data block to guess doc Korean CSID. */
|
||||
doc_csid = intl_detect_KCSID (INTL_GetCCCDefaultCSID(obj),(const unsigned char *) s, l);
|
||||
|
||||
if( doc_csid == CS_ASCII ){ /* return s unconverted and */
|
||||
INTL_SetCCCLen(obj, l);
|
||||
return (unsigned char *)s; /* autodetect next block of stream data */
|
||||
}
|
||||
|
||||
/* Setup converter function for success streams data blocks */
|
||||
|
||||
(void)INTL_GetCharCodeConverter( doc_csid, INTL_GetCCCToCSID(obj), obj );
|
||||
INTL_CallCCCReportAutoDetect(obj, doc_csid);
|
||||
|
||||
|
||||
/* If no conversion needed, change put_block module for successive
|
||||
* data blocks. For current data block, return unmodified buffer.
|
||||
*/
|
||||
if (INTL_GetCCCCvtfunc(obj) == NULL) {
|
||||
INTL_SetCCCLen(obj, l);
|
||||
return((unsigned char *) s);
|
||||
}
|
||||
/* For initial block, must call converter directly. Success calls
|
||||
* to the converter will be called directly from net_CharCodeConv()
|
||||
*/
|
||||
return (unsigned char *)(INTL_GetCCCCvtfunc(obj)) (obj, (const unsigned char*)s, l);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,905 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* b52cns.c */
|
||||
#include "intlpriv.h"
|
||||
extern int MK_OUT_OF_MEMORY;
|
||||
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
Function should be used internal to libi18n but need to referred
|
||||
out side this file
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
MODULE_PRIVATE unsigned char* mz_euctwtob5( CCCDataObject obj, const unsigned char *in, int32 insize);
|
||||
MODULE_PRIVATE unsigned char* mz_b5toeuctw( CCCDataObject obj, const unsigned char *in, int32 insize);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------ *
|
||||
Small function to isolate conversion code from CCCDataObject
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE void intl_fc_restore_conv_state(CCCDataObject obj, uint32* pst1, uint32* pst2);
|
||||
PRIVATE void intl_fc_save_conv_state(CCCDataObject obj, uint32 st1, uint32 st2);
|
||||
PRIVATE unsigned char* intl_fc_report_out_of_memory(CCCDataObject obj);
|
||||
PRIVATE unsigned char* intl_fc_return_buf_and_len( CCCDataObject obj, unsigned char* out, int32 outlen);
|
||||
PRIVATE uint32 intl_same_outsize(uint32 insize);
|
||||
PRIVATE uint32 intl_x2_outsize(uint32 insize);
|
||||
|
||||
PRIVATE XP_Bool intl_convcnstobig5(uint16 cns, uint8 cnsplane, uint16* big5);
|
||||
PRIVATE XP_Bool intl_convbig5tocns(uint16 big5, uint16* cns, uint8* cnsplane);
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
BIG5 to CNS conversion table stuff
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
typedef struct {
|
||||
uint16 cnsfromseq;
|
||||
uint16 cnstoseq;
|
||||
uint16 big5fromseq;
|
||||
} cnstobig5;
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
typedef struct {
|
||||
uint16 big5fromseq;
|
||||
uint16 big5toseq;
|
||||
uint16 cnsfromseq;
|
||||
uint8 cnsplane;
|
||||
} big5tocns;
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
#define BIG5HIBASE 0x00A1
|
||||
#define BIG5GAPBASE 0x007F
|
||||
#define BIG5LOWBASE 0x0040
|
||||
#define BIG5LOWERROW ( BIG5GAPBASE - BIG5LOWBASE )
|
||||
#define BIG5GAP ( BIG5HIBASE - BIG5GAPBASE )
|
||||
#define BIG5HIGHERROW ( 0x00FF - BIG5HIBASE )
|
||||
#define BIG5ROW ( BIG5LOWERROW + BIG5HIGHERROW )
|
||||
|
||||
#define CNSROWBASE 0x0021
|
||||
#define CNSROW ( 0x007F - CNSROWBASE )
|
||||
|
||||
#ifdef HIBYTE
|
||||
#undef HIBYTE
|
||||
#endif
|
||||
|
||||
#define HIBYTE(w) (((w) & 0xff00) >> 8)
|
||||
#define LOWBYTE(w) ((w) & 0x00ff)
|
||||
#define CNSTOSEQ(c) ((CNSROW * (HIBYTE(c) - CNSROWBASE)) + (LOWBYTE(c) - CNSROWBASE))
|
||||
#define SEQTOCNS(s) (((((s) / CNSROW) + CNSROWBASE) << 8 ) | (((s) % CNSROW) + CNSROWBASE))
|
||||
#define BIG5TOSEQ(b) ((HIBYTE(b) - 0x00A1) * BIG5ROW + ( LOWBYTE(b) - 0x40 ) - ( (b & 0x0080) ? BIG5GAP : 0 ))
|
||||
#define SEQTOBIG5(s) (((((s) / BIG5ROW) + BIG5HIBASE) << 8 ) | ( ((s) % BIG5ROW ) + BIG5LOWBASE + ((( (s) % BIG5ROW ) >= BIG5LOWERROW ) ? BIG5GAP : 0)))
|
||||
|
||||
#define CNSTOB5_CELL_BEGIN_END(c1, c2, b) { CNSTOSEQ(c1), CNSTOSEQ(c2), BIG5TOSEQ(b) } ,
|
||||
#define B5TOCNS_CELL_BEGIN_END(b1, b2, p, c) { BIG5TOSEQ(b1), BIG5TOSEQ(b2), CNSTOSEQ(c), (p) } ,
|
||||
|
||||
#define CNSTOB5_CELL_BEGIN(c, b) { CNSTOSEQ(c), CNSTOSEQ(c), BIG5TOSEQ(b) } ,
|
||||
#define B5TOCNS_CELL_BEGIN(b, p, c) { BIG5TOSEQ(b), BIG5TOSEQ(b), CNSTOSEQ(c), (p) } ,
|
||||
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE cnstobig5 cns1_map[] = {
|
||||
/* A.1. Big5 (ETen, IBM, and Microsoft version) symbol set correspondence*/
|
||||
/* to CNS 11643 Plane 1:*/
|
||||
CNSTOB5_CELL_BEGIN_END(0x2121, 0x2256, 0xA140) /* 0xA140-0xA1F5 <-> 0x2121-0x2256 */
|
||||
CNSTOB5_CELL_BEGIN (0x2257 , 0xA1F7) /* 0xA1F7 <-> 0x2257 */
|
||||
CNSTOB5_CELL_BEGIN (0x2258 , 0xA1F6) /* 0xA1F6 <-> 0x2258 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x2259, 0x234E, 0xA1F8) /* 0xA1F8-0xA2AE <-> 0x2259-0x234E */
|
||||
CNSTOB5_CELL_BEGIN_END(0x2421, 0x2570, 0xA2AF) /* 0xA2AF-0xA3BF <-> 0x2421-0x2570 */
|
||||
/* A.4. Big5 (ETen and IBM Version) specific numeric symbols*/
|
||||
/* correspondence to CNS 11643 Plane 1: (Microsoft version defined*/
|
||||
/* this area as UDC - User Defined Character)*/
|
||||
CNSTOB5_CELL_BEGIN_END(0x2621, 0x263E, 0xC6A1) /* 0xC6A1-0xC6BE <-> 0x2621-0x263E */
|
||||
/* A.5. Big5 (ETen and IBM Version) specific KangXi radicals*/
|
||||
/* correspondence to CNS 11643 Plane 1: (Microsoft version defined as*/
|
||||
/* UDC - User Definable Character)*/
|
||||
CNSTOB5_CELL_BEGIN (0x2723 , 0xC6BF) /* 0xC6BF <-> 0x2723 */
|
||||
CNSTOB5_CELL_BEGIN (0x2724 , 0xC6C0) /* 0xC6C0 <-> 0x2724 */
|
||||
CNSTOB5_CELL_BEGIN (0x2726 , 0xC6C1) /* 0xC6C1 <-> 0x2726 */
|
||||
CNSTOB5_CELL_BEGIN (0x2728 , 0xC6C2) /* 0xC6C2 <-> 0x2728 */
|
||||
CNSTOB5_CELL_BEGIN (0x272D , 0xC6C3) /* 0xC6C3 <-> 0x272D */
|
||||
CNSTOB5_CELL_BEGIN (0x272E , 0xC6C4) /* 0xC6C4 <-> 0x272E */
|
||||
CNSTOB5_CELL_BEGIN (0x272F , 0xC6C5) /* 0xC6C5 <-> 0x272F */
|
||||
CNSTOB5_CELL_BEGIN (0x2734 , 0xC6C6) /* 0xC6C6 <-> 0x2734 */
|
||||
CNSTOB5_CELL_BEGIN (0x2737 , 0xC6C7) /* 0xC6C7 <-> 0x2737 */
|
||||
CNSTOB5_CELL_BEGIN (0x273A , 0xC6C8) /* 0xC6C8 <-> 0x273A */
|
||||
CNSTOB5_CELL_BEGIN (0x273C , 0xC6C9) /* 0xC6C9 <-> 0x273C */
|
||||
CNSTOB5_CELL_BEGIN (0x2742 , 0xC6CA) /* 0xC6CA <-> 0x2742 */
|
||||
CNSTOB5_CELL_BEGIN (0x2747 , 0xC6CB) /* 0xC6CB <-> 0x2747 */
|
||||
CNSTOB5_CELL_BEGIN (0x274E , 0xC6CC) /* 0xC6CC <-> 0x274E */
|
||||
CNSTOB5_CELL_BEGIN (0x2753 , 0xC6CD) /* 0xC6CD <-> 0x2753 */
|
||||
CNSTOB5_CELL_BEGIN (0x2754 , 0xC6CE) /* 0xC6CE <-> 0x2754 */
|
||||
CNSTOB5_CELL_BEGIN (0x2755 , 0xC6CF) /* 0xC6CF <-> 0x2755 */
|
||||
CNSTOB5_CELL_BEGIN (0x2759 , 0xC6D0) /* 0xC6D0 <-> 0x2759 */
|
||||
CNSTOB5_CELL_BEGIN (0x275A , 0xC6D1) /* 0xC6D1 <-> 0x275A */
|
||||
CNSTOB5_CELL_BEGIN (0x2761 , 0xC6D2) /* 0xC6D2 <-> 0x2761 */
|
||||
CNSTOB5_CELL_BEGIN (0x2766 , 0xC6D3) /* 0xC6D3 <-> 0x2766 */
|
||||
CNSTOB5_CELL_BEGIN (0x2829 , 0xC6D4) /* 0xC6D4 <-> 0x2829 */
|
||||
CNSTOB5_CELL_BEGIN (0x282A , 0xC6D5) /* 0xC6D5 <-> 0x282A */
|
||||
CNSTOB5_CELL_BEGIN (0x2863 , 0xC6D6) /* 0xC6D6 <-> 0x2863 */
|
||||
CNSTOB5_CELL_BEGIN (0x286C , 0xC6D7) /* 0xC6D7 <-> 0x286C */
|
||||
/* A.2. Big5 (ETen, IBM, and Microsoft version) correspondence*/
|
||||
/* to CNS 11643 Plane 1:*/
|
||||
CNSTOB5_CELL_BEGIN_END(0x4221, 0x4241, 0xA3C0) /* 0xA3C0-0xA3E0 <-> 0x4221-0x4241 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x4421, 0x5322, 0xA440) /* 0xA440-0xACFD <-> 0x4421-0x5322 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x5323, 0x5752, 0xAD40) /* 0xAD40-0xAFCF <-> 0x5323-0x5752 */
|
||||
CNSTOB5_CELL_BEGIN (0x5753 , 0xACFE) /* 0xACFE <-> 0x5753 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x5754, 0x6B4F, 0xAFD0) /* 0xAFD0-0xBBC7 <-> 0x5754-0x6B4F */
|
||||
CNSTOB5_CELL_BEGIN (0x6B50 , 0xBE52) /* 0xBE52 <-> 0x6B50 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6B51, 0x6F5B, 0xBBC8) /* 0xBBC8-0xBE51 <-> 0x6B51-0x6F5B */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6F5C, 0x7534, 0xBE53) /* 0xBE53-0xC1AA <-> 0x6F5C-0x7534 */
|
||||
CNSTOB5_CELL_BEGIN (0x7535 , 0xC2CB) /* 0xC2CB <-> 0x7535 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x7536, 0x7736, 0xC1AB) /* 0xC1AB-0xC2CA <-> 0x7536-0x7736 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x7737, 0x782C, 0xC2CC) /* 0xC2CC-0xC360 <-> 0x7737-0x782C */
|
||||
CNSTOB5_CELL_BEGIN (0x782D , 0xC456) /* 0xC456 <-> 0x782D */
|
||||
CNSTOB5_CELL_BEGIN_END(0x782E, 0x7863, 0xC361) /* 0xC361-0xC3B8 <-> 0x782E-0x7863 */
|
||||
CNSTOB5_CELL_BEGIN (0x7864 , 0xC3BA) /* 0xC3BA <-> 0x7864 */
|
||||
CNSTOB5_CELL_BEGIN (0x7865 , 0xC3B9) /* 0xC3B9 <-> 0x7865 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x7866, 0x7961, 0xC3BB) /* 0xC3BB-0xC455 <-> 0x7866-0x7961 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x7962, 0x7D4B, 0xC457) /* 0xC457-0xC67E <-> 0x7962-0x7D4B */
|
||||
};
|
||||
/* -------------------------------------------------------------------- */
|
||||
PRIVATE cnstobig5 cns2_map[] = {
|
||||
/* A.3. Big5 (ETen, IBM, and Microsoft version) Level 2 correspondence to*/
|
||||
/* CNS 11643-1992 Plane 2:*/
|
||||
CNSTOB5_CELL_BEGIN_END(0x2121, 0x212A, 0xC940) /* 0xC940-0xC949 <-> 0x2121-0x212A */
|
||||
CNSTOB5_CELL_BEGIN_END(0x212B, 0x214B, 0xC94B) /* 0xC94B-0xC96B <-> 0x212B-0x214B */
|
||||
CNSTOB5_CELL_BEGIN (0x214C , 0xC9BE) /* 0xC9BE <-> 0x214C */
|
||||
CNSTOB5_CELL_BEGIN_END(0x214D, 0x217C, 0xC96C) /* 0xC96C-0xC9BD <-> 0x214D-0x217C */
|
||||
CNSTOB5_CELL_BEGIN_END(0x217D, 0x224C, 0xC9BF) /* 0xC9BF-0xC9EC <-> 0x217D-0x224C */
|
||||
CNSTOB5_CELL_BEGIN (0x224D , 0xCAF7) /* 0xCAF7 <-> 0x224D */
|
||||
CNSTOB5_CELL_BEGIN_END(0x224E, 0x2438, 0xC9ED) /* 0xC9ED-0xCAF6 <-> 0x224E-0x2438 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x2439, 0x387D, 0xCAF8) /* 0xCAF8-0xD779 <-> 0x2439-0x387D */
|
||||
CNSTOB5_CELL_BEGIN_END(0x387E, 0x3F69, 0xD77B) /* 0xD77B-0xDBA6 <-> 0x387E-0x3F69 */
|
||||
CNSTOB5_CELL_BEGIN (0x3F6A , 0xD77A) /* 0xD77A <-> 0x3F6A */
|
||||
CNSTOB5_CELL_BEGIN_END(0x3F6B, 0x4423, 0xDBA7) /* 0xDBA7-0xDDFB <-> 0x3F6B-0x4423 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x4424, 0x554A, 0xDDFD) /* 0xDDFD-0xE8A2 <-> 0x4424-0x554A */
|
||||
CNSTOB5_CELL_BEGIN (0x554B , 0xEBF1) /* 0xEBF1 <-> 0x554B */
|
||||
CNSTOB5_CELL_BEGIN_END(0x554C, 0x5721, 0xE8A3) /* 0xE8A3-0xE975 <-> 0x554C-0x5721 */
|
||||
CNSTOB5_CELL_BEGIN (0x5722 , 0xECDE) /* 0xECDE <-> 0x5722 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x5723, 0x5A27, 0xE976) /* 0xE976-0xEB5A <-> 0x5723-0x5A27 */
|
||||
CNSTOB5_CELL_BEGIN (0x5A28 , 0xF0CB) /* 0xF0CB <-> 0x5A28 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x5A29, 0x5B3E, 0xEB5B) /* 0xEB5B-0xEBF0 <-> 0x5A29-0x5B3E */
|
||||
CNSTOB5_CELL_BEGIN_END(0x5B3F, 0x5C69, 0xEBF2) /* 0xEBF2-0xECDD <-> 0x5B3F-0x5C69 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x5C6A, 0x5D73, 0xECDF) /* 0xECDF-0xEDA9 <-> 0x5C6A-0x5D73 */
|
||||
CNSTOB5_CELL_BEGIN (0x5D74 , 0xF056) /* 0xF056 <-> 0x5D74 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x5D75, 0x6038, 0xEDAA) /* 0xEDAA-0xEEEA <-> 0x5D75-0x6038 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6039, 0x6242, 0xEEEC) /* 0xEEEC-0xF055 <-> 0x6039-0x6242 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6243, 0x6336, 0xF057) /* 0xF057-0xF0CA <-> 0x6243-0x6336 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6337, 0x642E, 0xF0CC) /* 0xF0CC-0xF162 <-> 0x6337-0x642E */
|
||||
CNSTOB5_CELL_BEGIN (0x642F , 0xEEEB) /* 0xEEEB <-> 0x642F */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6430, 0x6437, 0xF163) /* 0xF163-0xF16A <-> 0x6430-0x6437 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6438, 0x6572, 0xF16C) /* 0xF16C-0xF267 <-> 0x6438-0x6572 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6573, 0x664C, 0xF269) /* 0xF269-0xF2C2 <-> 0x6573-0x664C */
|
||||
CNSTOB5_CELL_BEGIN (0x664D , 0xF4B5) /* 0xF4B5 <-> 0x664D */
|
||||
CNSTOB5_CELL_BEGIN_END(0x664E, 0x6760, 0xF2C3) /* 0xF2C3-0xF374 <-> 0x664E-0x6760 */
|
||||
CNSTOB5_CELL_BEGIN (0x6761 , 0xF16B) /* 0xF16B <-> 0x6761 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6762, 0x6933, 0xF375) /* 0xF375-0xF465 <-> 0x6762-0x6933 */
|
||||
CNSTOB5_CELL_BEGIN (0x6934 , 0xF268) /* 0xF268 <-> 0x6934 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6935, 0x6961, 0xF466) /* 0xF466-0xF4B4 <-> 0x6935-0x6961 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6962, 0x6A4A, 0xF4B6) /* 0xF4B6-0xF4FC <-> 0x6962-0x6A4A */
|
||||
CNSTOB5_CELL_BEGIN (0x6A4B , 0xF663) /* 0xF663 <-> 0x6A4B */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6A4C, 0x6C51, 0xF4FD) /* 0xF4FD-0xF662 <-> 0x6A4C-0x6C51 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x6C52, 0x7165, 0xF664) /* 0xF664-0xF976 <-> 0x6C52-0x7165 */
|
||||
CNSTOB5_CELL_BEGIN (0x7166 , 0xF9C4) /* 0xF9C4 <-> 0x7166 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x7167, 0x7233, 0xF977) /* 0xF977-0xF9C3 <-> 0x7167-0x7233 */
|
||||
CNSTOB5_CELL_BEGIN (0x7234 , 0xF9C5) /* 0xF9C5 <-> 0x7234 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x7235, 0x723F, 0xF9C7) /* 0xF9C7-0xF9D1 <-> 0x7235-0x723F */
|
||||
CNSTOB5_CELL_BEGIN (0x7240 , 0xF9C6) /* 0xF9C6 <-> 0x7240 */
|
||||
CNSTOB5_CELL_BEGIN_END(0x7241, 0x7244, 0xF9D2) /* 0xF9D2-0xF9D5 <-> 0x7241-0x7244 */
|
||||
};
|
||||
/* -------------------------------------------------------------------- */
|
||||
PRIVATE cnstobig5 cns3_map[] = {
|
||||
/* A.6. Big5 (ETen and Microsoft version) specific Ideographs*/
|
||||
/* correspondence to CNS 11643 Plane 3: (IBM version defined as UDC)*/
|
||||
CNSTOB5_CELL_BEGIN (0x2C5D , 0xF9DA) /* 0xF9DA <-> 0x2C5D */
|
||||
CNSTOB5_CELL_BEGIN (0x3D7E , 0xF9DB) /* 0xF9DB <-> 0x3D7E */
|
||||
CNSTOB5_CELL_BEGIN (0x4337 , 0xF9D6) /* 0xF9D6 <-> 0x4337 */
|
||||
CNSTOB5_CELL_BEGIN (0x444E , 0xF9D8) /* 0xF9D8 <-> 0x444E */
|
||||
CNSTOB5_CELL_BEGIN (0x4B5C , 0xF9DC) /* 0xF9DC <-> 0x4B5C */
|
||||
CNSTOB5_CELL_BEGIN (0x4F50 , 0xF9D7) /* 0xF9D7 <-> 0x4F50 */
|
||||
CNSTOB5_CELL_BEGIN (0x504A , 0xF9D9) /* 0xF9D9 <-> 0x504A */
|
||||
};
|
||||
/* -------------------------------------------------------------------- */
|
||||
PRIVATE cnstobig5 cns4_map[] = {
|
||||
/* A.7. Big5 (ETen version only) specific symbols correspondence to CNS*/
|
||||
/* 11643 Plane 4:*/
|
||||
CNSTOB5_CELL_BEGIN (0x2123 , 0xC879) /* 0xC879 <-> 0x2123 */
|
||||
CNSTOB5_CELL_BEGIN (0x2124 , 0xC87B) /* 0xC87B <-> 0x2124 */
|
||||
CNSTOB5_CELL_BEGIN (0x212A , 0xC87D) /* 0xC87D <-> 0x212A */
|
||||
CNSTOB5_CELL_BEGIN (0x2152 , 0xC8A2) /* 0xC8A2 <-> 0x2152 */
|
||||
};
|
||||
/* -------------------------------------------------------------------- */
|
||||
PRIVATE cnstobig5 *cns_map[4] = {
|
||||
cns1_map,
|
||||
cns2_map,
|
||||
cns3_map,
|
||||
cns4_map
|
||||
};
|
||||
/* -------------------------------------------------------------------- */
|
||||
PRIVATE uint32 cns_map_size[4] = {
|
||||
sizeof(cns1_map)/sizeof(cnstobig5),
|
||||
sizeof(cns2_map)/sizeof(cnstobig5),
|
||||
sizeof(cns3_map)/sizeof(cnstobig5),
|
||||
sizeof(cns4_map)/sizeof(cnstobig5)
|
||||
};
|
||||
/* -------------------------------------------------------------------- */
|
||||
PRIVATE big5tocns big5_map[] = {
|
||||
#define CNSPLANE 1
|
||||
/* A.1. Big5 (ETen, IBM, and Microsoft version) symbol set correspondence*/
|
||||
/* to CNS 11643 Plane 1:*/
|
||||
B5TOCNS_CELL_BEGIN_END( 0xA140, 0xA1F5, CNSPLANE , 0x2121) /* 0xA140-0xA1F5 <-> 0x2121-0x2256 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xA1F6, CNSPLANE , 0x2258) /* 0xA1F6 <-> 0x2258 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xA1F7, CNSPLANE , 0x2257) /* 0xA1F7 <-> 0x2257 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xA1F8, 0xA2AE, CNSPLANE , 0x2259) /* 0xA1F8-0xA2AE <-> 0x2259-0x234E */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xA2AF, 0xA3BF, CNSPLANE , 0x2421) /* 0xA2AF-0xA3BF <-> 0x2421-0x2570 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xA3C0, 0xA3E0, CNSPLANE , 0x4221) /* 0xA3C0-0xA3E0 <-> 0x4221-0x4241 */
|
||||
/* A.2. Big5 (ETen, IBM, and Microsoft version) correspondence*/
|
||||
/* to CNS 11643 Plane 1:*/
|
||||
B5TOCNS_CELL_BEGIN_END( 0xA440, 0xACFD, CNSPLANE , 0x4421) /* 0xA440-0xACFD <-> 0x4421-0x5322 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xACFE, CNSPLANE , 0x5753) /* 0xACFE <-> 0x5753 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xAD40, 0xAFCF, CNSPLANE , 0x5323) /* 0xAD40-0xAFCF <-> 0x5323-0x5752 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xAFD0, 0xBBC7, CNSPLANE , 0x5754) /* 0xAFD0-0xBBC7 <-> 0x5754-0x6B4F */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xBBC8, 0xBE51, CNSPLANE , 0x6B51) /* 0xBBC8-0xBE51 <-> 0x6B51-0x6F5B */
|
||||
B5TOCNS_CELL_BEGIN ( 0xBE52, CNSPLANE , 0x6B50) /* 0xBE52 <-> 0x6B50 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xBE53, 0xC1AA, CNSPLANE , 0x6F5C) /* 0xBE53-0xC1AA <-> 0x6F5C-0x7534 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xC1AB, 0xC2CA, CNSPLANE , 0x7536) /* 0xC1AB-0xC2CA <-> 0x7536-0x7736 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC2CB, CNSPLANE , 0x7535) /* 0xC2CB <-> 0x7535 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xC2CC, 0xC360, CNSPLANE , 0x7737) /* 0xC2CC-0xC360 <-> 0x7737-0x782C */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xC361, 0xC3B8, CNSPLANE , 0x782E) /* 0xC361-0xC3B8 <-> 0x782E-0x7863 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC3B9, CNSPLANE , 0x7865) /* 0xC3B9 <-> 0x7865 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC3BA, CNSPLANE , 0x7864) /* 0xC3BA <-> 0x7864 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xC3BB, 0xC455, CNSPLANE , 0x7866) /* 0xC3BB-0xC455 <-> 0x7866-0x7961 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC456, CNSPLANE , 0x782D) /* 0xC456 <-> 0x782D */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xC457, 0xC67E, CNSPLANE , 0x7962) /* 0xC457-0xC67E <-> 0x7962-0x7D4B */
|
||||
/* A.4. Big5 (ETen and IBM Version) specific numeric symbols*/
|
||||
/* correspondence to CNS 11643 Plane 1: (Microsoft version defined*/
|
||||
/* this area as UDC - User Defined Character)*/
|
||||
B5TOCNS_CELL_BEGIN_END( 0xC6A1, 0xC6BE, CNSPLANE , 0x2621) /* 0xC6A1-0xC6BE <-> 0x2621-0x263E */
|
||||
/* A.5. Big5 (ETen and IBM Version) specific KangXi radicals*/
|
||||
/* correspondence to CNS 11643 Plane 1: (Microsoft version defined as*/
|
||||
/* UDC - User Definable Character)*/
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6BF, CNSPLANE , 0x2723) /* 0xC6BF <-> 0x2723 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6C0, CNSPLANE , 0x2724) /* 0xC6C0 <-> 0x2724 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6C1, CNSPLANE , 0x2726) /* 0xC6C1 <-> 0x2726 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6C2, CNSPLANE , 0x2728) /* 0xC6C2 <-> 0x2728 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6C3, CNSPLANE , 0x272D) /* 0xC6C3 <-> 0x272D */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6C4, CNSPLANE , 0x272E) /* 0xC6C4 <-> 0x272E */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6C5, CNSPLANE , 0x272F) /* 0xC6C5 <-> 0x272F */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6C6, CNSPLANE , 0x2734) /* 0xC6C6 <-> 0x2734 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6C7, CNSPLANE , 0x2737) /* 0xC6C7 <-> 0x2737 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6C8, CNSPLANE , 0x273A) /* 0xC6C8 <-> 0x273A */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6C9, CNSPLANE , 0x273C) /* 0xC6C9 <-> 0x273C */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6CA, CNSPLANE , 0x2742) /* 0xC6CA <-> 0x2742 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6CB, CNSPLANE , 0x2747) /* 0xC6CB <-> 0x2747 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6CC, CNSPLANE , 0x274E) /* 0xC6CC <-> 0x274E */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6CD, CNSPLANE , 0x2753) /* 0xC6CD <-> 0x2753 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6CE, CNSPLANE , 0x2754) /* 0xC6CE <-> 0x2754 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6CF, CNSPLANE , 0x2755) /* 0xC6CF <-> 0x2755 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6D0, CNSPLANE , 0x2759) /* 0xC6D0 <-> 0x2759 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6D1, CNSPLANE , 0x275A) /* 0xC6D1 <-> 0x275A */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6D2, CNSPLANE , 0x2761) /* 0xC6D2 <-> 0x2761 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6D3, CNSPLANE , 0x2766) /* 0xC6D3 <-> 0x2766 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6D4, CNSPLANE , 0x2829) /* 0xC6D4 <-> 0x2829 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6D5, CNSPLANE , 0x282A) /* 0xC6D5 <-> 0x282A */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6D6, CNSPLANE , 0x2863) /* 0xC6D6 <-> 0x2863 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC6D7, CNSPLANE , 0x286C) /* 0xC6D7 <-> 0x286C */
|
||||
#undef CNSPLANE
|
||||
|
||||
#define CNSPLANE 4
|
||||
/* A.7. Big5 (ETen version only) specific symbols correspondence to CNS*/
|
||||
/* 11643 Plane 4:*/
|
||||
B5TOCNS_CELL_BEGIN ( 0xC879, CNSPLANE , 0x2123) /* 0xC879 <-> 0x2123 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC87B, CNSPLANE , 0x2124) /* 0xC87B <-> 0x2124 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC87D, CNSPLANE , 0x212A) /* 0xC87D <-> 0x212A */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC8A2, CNSPLANE , 0x2152) /* 0xC8A2 <-> 0x2152 */
|
||||
#undef CNSPLANE
|
||||
|
||||
#define CNSPLANE 2
|
||||
/* A.3. Big5 (ETen, IBM, and Microsoft version) Level 2 correspondence to*/
|
||||
/* CNS 11643-1992 Plane 2:*/
|
||||
B5TOCNS_CELL_BEGIN_END( 0xC940, 0xC949, CNSPLANE , 0x2121) /* 0xC940-0xC949 <-> 0x2121-0x212A */
|
||||
#undef CNSPLANE
|
||||
#define CNSPLANE 1
|
||||
B5TOCNS_CELL_BEGIN ( 0xC94A, CNSPLANE , 0x4442) /* 0xC94A <-> 0x4442 # duplicate of Level 1's 0xA461 */
|
||||
#undef CNSPLANE
|
||||
#define CNSPLANE 2
|
||||
B5TOCNS_CELL_BEGIN_END( 0xC94B, 0xC96B, CNSPLANE , 0x212B) /* 0xC94B-0xC96B <-> 0x212B-0x214B */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xC96C, 0xC9BD, CNSPLANE , 0x214D) /* 0xC96C-0xC9BD <-> 0x214D-0x217C */
|
||||
B5TOCNS_CELL_BEGIN ( 0xC9BE, CNSPLANE , 0x214C) /* 0xC9BE <-> 0x214C */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xC9BF, 0xC9EC, CNSPLANE , 0x217D) /* 0xC9BF-0xC9EC <-> 0x217D-0x224C */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xC9ED, 0xCAF6, CNSPLANE , 0x224E) /* 0xC9ED-0xCAF6 <-> 0x224E-0x2438 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xCAF7, CNSPLANE , 0x224D) /* 0xCAF7 <-> 0x224D */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xCAF8, 0xD779, CNSPLANE , 0x2439) /* 0xCAF8-0xD779 <-> 0x2439-0x387D */
|
||||
B5TOCNS_CELL_BEGIN ( 0xD77A, CNSPLANE , 0x3F6A) /* 0xD77A <-> 0x3F6A */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xD77B, 0xDBA6, CNSPLANE , 0x387E) /* 0xD77B-0xDBA6 <-> 0x387E-0x3F69 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xDBA7, 0xDDFB, CNSPLANE , 0x3F6B) /* 0xDBA7-0xDDFB <-> 0x3F6B-0x4423 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xDDFC, CNSPLANE , 0x4176) /* 0xDDFC <-> 0x4176 # duplicate of 0xDCD1 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xDDFD, 0xE8A2, CNSPLANE , 0x4424) /* 0xDDFD-0xE8A2 <-> 0x4424-0x554A */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xE8A3, 0xE975, CNSPLANE , 0x554C) /* 0xE8A3-0xE975 <-> 0x554C-0x5721 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xE976, 0xEB5A, CNSPLANE , 0x5723) /* 0xE976-0xEB5A <-> 0x5723-0x5A27 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xEB5B, 0xEBF0, CNSPLANE , 0x5A29) /* 0xEB5B-0xEBF0 <-> 0x5A29-0x5B3E */
|
||||
B5TOCNS_CELL_BEGIN ( 0xEBF1, CNSPLANE , 0x554B) /* 0xEBF1 <-> 0x554B */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xEBF2, 0xECDD, CNSPLANE , 0x5B3F) /* 0xEBF2-0xECDD <-> 0x5B3F-0x5C69 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xECDE, CNSPLANE , 0x5722) /* 0xECDE <-> 0x5722 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xECDF, 0xEDA9, CNSPLANE , 0x5C6A) /* 0xECDF-0xEDA9 <-> 0x5C6A-0x5D73 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xEDAA, 0xEEEA, CNSPLANE , 0x5D75) /* 0xEDAA-0xEEEA <-> 0x5D75-0x6038 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xEEEB, CNSPLANE , 0x642F) /* 0xEEEB <-> 0x642F */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xEEEC, 0xF055, CNSPLANE , 0x6039) /* 0xEEEC-0xF055 <-> 0x6039-0x6242 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF056, CNSPLANE , 0x5D74) /* 0xF056 <-> 0x5D74 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF057, 0xF0CA, CNSPLANE , 0x6243) /* 0xF057-0xF0CA <-> 0x6243-0x6336 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF0CB, CNSPLANE , 0x5A28) /* 0xF0CB <-> 0x5A28 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF0CC, 0xF162, CNSPLANE , 0x6337) /* 0xF0CC-0xF162 <-> 0x6337-0x642E */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF163, 0xF16A, CNSPLANE , 0x6430) /* 0xF163-0xF16A <-> 0x6430-0x6437 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF16B, CNSPLANE , 0x6761) /* 0xF16B <-> 0x6761 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF16C, 0xF267, CNSPLANE , 0x6438) /* 0xF16C-0xF267 <-> 0x6438-0x6572 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF268, CNSPLANE , 0x6934) /* 0xF268 <-> 0x6934 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF269, 0xF2C2, CNSPLANE , 0x6573) /* 0xF269-0xF2C2 <-> 0x6573-0x664C */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF2C3, 0xF374, CNSPLANE , 0x664E) /* 0xF2C3-0xF374 <-> 0x664E-0x6760 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF375, 0xF465, CNSPLANE , 0x6762) /* 0xF375-0xF465 <-> 0x6762-0x6933 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF466, 0xF4B4, CNSPLANE , 0x6935) /* 0xF466-0xF4B4 <-> 0x6935-0x6961 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF4B5, CNSPLANE , 0x664D) /* 0xF4B5 <-> 0x664D */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF4B6, 0xF4FC, CNSPLANE , 0x6962) /* 0xF4B6-0xF4FC <-> 0x6962-0x6A4A */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF4FD, 0xF662, CNSPLANE , 0x6A4C) /* 0xF4FD-0xF662 <-> 0x6A4C-0x6C51 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF663, CNSPLANE , 0x6A4B) /* 0xF663 <-> 0x6A4B */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF664, 0xF976, CNSPLANE , 0x6C52) /* 0xF664-0xF976 <-> 0x6C52-0x7165 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF977, 0xF9C3, CNSPLANE , 0x7167) /* 0xF977-0xF9C3 <-> 0x7167-0x7233 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF9C4, CNSPLANE , 0x7166) /* 0xF9C4 <-> 0x7166 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF9C5, CNSPLANE , 0x7234) /* 0xF9C5 <-> 0x7234 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF9C6, CNSPLANE , 0x7240) /* 0xF9C6 <-> 0x7240 */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF9C7, 0xF9D1, CNSPLANE , 0x7235) /* 0xF9C7-0xF9D1 <-> 0x7235-0x723F */
|
||||
B5TOCNS_CELL_BEGIN_END( 0xF9D2, 0xF9D5, CNSPLANE , 0x7241) /* 0xF9D2-0xF9D5 <-> 0x7241-0x7244 */
|
||||
#undef CNSPLANE
|
||||
|
||||
#define CNSPLANE 3
|
||||
/* A.6. Big5 (ETen and Microsoft version) specific Ideographs*/
|
||||
/* correspondence to CNS 11643 Plane 3: (IBM version defined as UDC)*/
|
||||
B5TOCNS_CELL_BEGIN ( 0xF9D6, CNSPLANE , 0x4337) /* 0xF9D6 <-> 0x4337 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF9D7, CNSPLANE , 0x4F50) /* 0xF9D7 <-> 0x4F50 */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF9D8, CNSPLANE , 0x444E) /* 0xF9D8 <-> 0x444E */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF9D9, CNSPLANE , 0x504A) /* 0xF9D9 <-> 0x504A */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF9DA, CNSPLANE , 0x2C5D) /* 0xF9DA <-> 0x2C5D */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF9DB, CNSPLANE , 0x3D7E) /* 0xF9DB <-> 0x3D7E */
|
||||
B5TOCNS_CELL_BEGIN ( 0xF9DC, CNSPLANE , 0x4B5C) /* 0xF9DC <-> 0x4B5C */
|
||||
#undef CNSPLANE
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
CVTable
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
typedef unsigned char* (*Fn_return_buf_and_len) ( CCCDataObject obj, unsigned char* out, int32 outlen);
|
||||
typedef unsigned char* (*Fn_report_out_of_memory) ( CCCDataObject obj);
|
||||
typedef void (*Fn_restore_conv_state) ( CCCDataObject obj, uint32* pst1, uint32* pst2);
|
||||
typedef void (*Fn_save_conv_state) ( CCCDataObject obj, uint32 st1, uint32 st2);
|
||||
|
||||
typedef void* (*Fn_state_create) ();
|
||||
typedef void (*Fn_state_destroy) (void* state);
|
||||
typedef void (*Fn_state_init) (void* state, uint32 st1, uint32 st2);
|
||||
typedef void (*Fn_state_get_value) (void* state, uint32 *pst1, uint32 *pst2);
|
||||
|
||||
typedef uint32 (*Fn_outsize) (uint32 insize);
|
||||
typedef XP_Bool (*Fn_scan) (void *state, unsigned char in);
|
||||
typedef uint32 (*Fn_generate) (void *state, unsigned char* out);
|
||||
|
||||
typedef struct {
|
||||
Fn_report_out_of_memory report_out_of_memory;
|
||||
Fn_return_buf_and_len return_buf_and_len;
|
||||
Fn_restore_conv_state restore_conv_state;
|
||||
Fn_save_conv_state save_conv_state;
|
||||
|
||||
Fn_state_create state_create;
|
||||
Fn_state_destroy state_destroy;
|
||||
Fn_state_init state_init;
|
||||
Fn_state_get_value state_get_value;
|
||||
|
||||
Fn_outsize outsize;
|
||||
Fn_scan scan;
|
||||
Fn_generate generate;
|
||||
} CVTable;
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE unsigned char* intl_fc_conv_generic( CCCDataObject obj, const unsigned char *in, int32 insize, CVTable *vtbl);
|
||||
|
||||
PRIVATE void* intl_b5cns_state_create ();
|
||||
PRIVATE void intl_b5cns_state_destroy (void* state);
|
||||
PRIVATE void intl_b5cns_state_init (void* state, uint32 st1, uint32 st2);
|
||||
PRIVATE void intl_b5cns_state_get_value (void* state, uint32 *pst1, uint32 *pst2);
|
||||
|
||||
PRIVATE XP_Bool intl_big5_scan (void *state, unsigned char in);
|
||||
PRIVATE uint32 intl_big5_euctw_generate (void *state, unsigned char* out);
|
||||
|
||||
PRIVATE XP_Bool intl_euctw_scan (void *state, unsigned char in);
|
||||
PRIVATE uint32 intl_euctw_big5_generate (void *state, unsigned char* out);
|
||||
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE CVTable intl_euctw_b5_vtbl =
|
||||
{
|
||||
&intl_fc_report_out_of_memory,
|
||||
&intl_fc_return_buf_and_len,
|
||||
&intl_fc_restore_conv_state,
|
||||
&intl_fc_save_conv_state,
|
||||
|
||||
&intl_b5cns_state_create,
|
||||
&intl_b5cns_state_destroy,
|
||||
&intl_b5cns_state_init,
|
||||
&intl_b5cns_state_get_value,
|
||||
|
||||
&intl_same_outsize,
|
||||
&intl_euctw_scan,
|
||||
&intl_euctw_big5_generate,
|
||||
};
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE CVTable intl_b5_euctw_vtbl =
|
||||
{
|
||||
&intl_fc_report_out_of_memory,
|
||||
&intl_fc_return_buf_and_len,
|
||||
&intl_fc_restore_conv_state,
|
||||
&intl_fc_save_conv_state,
|
||||
|
||||
&intl_b5cns_state_create,
|
||||
&intl_b5cns_state_destroy,
|
||||
&intl_b5cns_state_init,
|
||||
&intl_b5cns_state_get_value,
|
||||
|
||||
&intl_x2_outsize,
|
||||
&intl_big5_scan,
|
||||
&intl_big5_euctw_generate,
|
||||
};
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
typedef enum {
|
||||
kError = -1,
|
||||
kDone = 0,
|
||||
k1MoreBytes,
|
||||
k2MoreBytes,
|
||||
k3MoreBytes
|
||||
} parseStatus;
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
typedef struct {
|
||||
parseStatus status;
|
||||
uint8 num_byte;
|
||||
unsigned char bytes[4];
|
||||
} B5CNSstate;
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE void* intl_b5cns_state_create()
|
||||
{
|
||||
return XP_ALLOC(sizeof(B5CNSstate));
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE void intl_b5cns_state_destroy(void* state)
|
||||
{
|
||||
XP_FREE(state);
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE void intl_b5cns_state_init(void* state, uint32 st1, uint32 st2)
|
||||
{
|
||||
B5CNSstate* obj = (B5CNSstate*)state;
|
||||
obj->status = (parseStatus)((st1 >> 8) & 0x00FF);
|
||||
obj->num_byte = (uint8)(st1) & 0x00FF;
|
||||
obj->bytes[0] = (unsigned char)(st2 ) & 0x00FF;
|
||||
obj->bytes[1] = (unsigned char)(st2 >> 8) & 0x00FF;
|
||||
obj->bytes[2] = (unsigned char)(st2 >> 16) & 0x00FF;
|
||||
obj->bytes[3] = (unsigned char)(st2 >> 24) & 0x00FF;
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE void intl_b5cns_state_get_value(void* state, uint32 *pst1, uint32 *pst2)
|
||||
{
|
||||
B5CNSstate* obj = (B5CNSstate*)state;
|
||||
*pst1 = (obj->status << 8) | obj->num_byte;
|
||||
*pst2 = obj->bytes[0] | (obj->bytes[1] << 8) | (obj->bytes[2] << 16) | (obj->bytes[3] << 24) ;
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE XP_Bool intl_big5_scan(void *state, unsigned char in)
|
||||
{
|
||||
B5CNSstate* obj = (B5CNSstate*)state;
|
||||
obj->bytes[obj->num_byte++] = in;
|
||||
|
||||
XP_ASSERT( ( kDone == obj->status ) || ( k1MoreBytes == obj->status ));
|
||||
switch( obj->status )
|
||||
{
|
||||
case kDone:
|
||||
if((0x00FE >= in) && ( in >= 0x00A1))
|
||||
{
|
||||
obj->status = k1MoreBytes;
|
||||
return FALSE;
|
||||
} else {
|
||||
XP_ASSERT( ( in <= 0x7F ) || (0xA0 == in)); /* legal single byte range + hacky 0xa0 */
|
||||
obj->status = kDone;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case k1MoreBytes:
|
||||
XP_ASSERT( ((0x0040 <= in) && ( in <= 0x007E)) ||
|
||||
((0x00A1 <= in) && ( in <= 0x00FE))); /* legal 2nd byte */
|
||||
obj->status = kDone;
|
||||
return TRUE;
|
||||
|
||||
default:
|
||||
XP_ASSERT(0);
|
||||
obj->num_byte = 0; /* reset */
|
||||
obj->status = kDone; /* reset */
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE uint32 intl_big5_euctw_generate(void *state, unsigned char* out)
|
||||
{
|
||||
B5CNSstate* obj = (B5CNSstate*)state;
|
||||
uint8 n = obj->num_byte;
|
||||
obj->num_byte = 0;
|
||||
XP_ASSERT( ( 1 == n) || ( 2 == n ));
|
||||
switch(n)
|
||||
{
|
||||
case 1:
|
||||
*out = obj->bytes[0];
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if(((0x007E >= obj->bytes[1]) && ( obj->bytes[1] >= 0x0040)) ||
|
||||
((0x00FE >= obj->bytes[1]) && ( obj->bytes[1] >= 0x00A1))
|
||||
)
|
||||
{
|
||||
uint16 cns;
|
||||
uint8 plane;
|
||||
uint16 big5 = (obj->bytes[0] << 8) | (obj->bytes[1]);
|
||||
if(intl_convbig5tocns(big5, &cns, &plane))
|
||||
{
|
||||
XP_ASSERT(plane > 0);
|
||||
XP_ASSERT(plane <= 16);
|
||||
if(plane > 1)
|
||||
{
|
||||
*out++ = (unsigned char)0x8E;
|
||||
*out++ = (unsigned char)(((unsigned char)0xA0) + plane);
|
||||
n = 4;
|
||||
} else {
|
||||
n = 2;
|
||||
}
|
||||
*out++ = (unsigned char)((cns >> 8) & 0xFF) | 0x80;
|
||||
*out = (unsigned char)(cns & 0x00FF) | 0x80;
|
||||
return n;
|
||||
}
|
||||
}
|
||||
XP_ASSERT(0);
|
||||
*out++ = '?'; /* error handling */
|
||||
*out = '?'; /* error handling */
|
||||
return 2;
|
||||
|
||||
default:
|
||||
XP_ASSERT(0);
|
||||
n = 0;
|
||||
break;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE XP_Bool intl_euctw_scan(void *state, unsigned char in)
|
||||
{
|
||||
B5CNSstate* obj = (B5CNSstate*)state;
|
||||
obj->bytes[obj->num_byte++] = in;
|
||||
XP_ASSERT( ( k1MoreBytes == obj->status ) ||
|
||||
( k2MoreBytes == obj->status ) ||
|
||||
( k3MoreBytes == obj->status ) ||
|
||||
( kDone == obj->status ));
|
||||
switch( obj->status )
|
||||
{
|
||||
case kDone:
|
||||
if((0x00FE >= in) && ( in >= 0x00A1))
|
||||
{
|
||||
obj->status = k1MoreBytes;
|
||||
return FALSE;
|
||||
} else {
|
||||
if(0x008E == in)
|
||||
{
|
||||
obj->status = k3MoreBytes;
|
||||
return FALSE;
|
||||
} else {
|
||||
XP_ASSERT( ( in <= 0x7F ) || (0xA0 == in)); /* legal single byte range + hacky 0xa0 */
|
||||
obj->status = kDone;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
case k3MoreBytes:
|
||||
XP_ASSERT( (0x00B0 >= in) && ( in >= 0x00A1)); /* legal plane byte */
|
||||
/* no break; here */
|
||||
case k1MoreBytes:
|
||||
case k2MoreBytes:
|
||||
XP_ASSERT( (0x00FE >= in) && ( in >= 0x00A1)); /* legal 2-3 bytes*/
|
||||
obj->status--;
|
||||
if(kDone == obj->status)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
default:
|
||||
XP_ASSERT(0);
|
||||
obj->num_byte = 0; /* reset */
|
||||
obj->status = kDone; /* reset */
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE uint32 intl_euctw_big5_generate(void *state, unsigned char* out)
|
||||
{
|
||||
B5CNSstate* obj = (B5CNSstate*)state;
|
||||
uint8 n = obj->num_byte;
|
||||
unsigned char hb, lb;
|
||||
obj->num_byte = 0;
|
||||
XP_ASSERT( ( 1 == n) || ( 2 == n ) || ( 4 == n ));
|
||||
switch(n)
|
||||
{
|
||||
case 1:
|
||||
*out = obj->bytes[0];
|
||||
break;
|
||||
|
||||
case 2:
|
||||
hb = obj->bytes[0];
|
||||
lb = obj->bytes[1];
|
||||
if((0x00FE >= lb) && ( lb >= 0x00A1))
|
||||
{
|
||||
uint16 big5;
|
||||
uint16 cns = ((hb & 0x7F) << 8) | (lb & 0x7F);
|
||||
if(intl_convcnstobig5(cns, 1, &big5))
|
||||
{
|
||||
*out++ = (unsigned char)((big5 >> 8) & 0xFF);
|
||||
*out = (unsigned char)(big5 & 0x00FF);
|
||||
return 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* do not assert if it failed into some range we know there are no conversion */
|
||||
XP_ASSERT(( 0x7D == (hb & 0x7f) ) ||
|
||||
( 0x7E == (hb & 0x7f) ) ||
|
||||
( (0x27 <= (hb & 0x7f)) && ((hb & 0x7f) <= 0x43))
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
XP_ASSERT(0);
|
||||
}
|
||||
*out++ = '?'; /* error handling */
|
||||
*out = '?'; /* error handling */
|
||||
n = 2;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
hb = obj->bytes[2];
|
||||
lb = obj->bytes[3];
|
||||
if(((0x00FE >= hb) && ( hb >= 0x00A1)) &&
|
||||
((0x00FE >= lb) && ( lb >= 0x00A1)) &&
|
||||
((0x00B0 >= obj->bytes[1]) && ( obj->bytes[1] >= 0x00A1))
|
||||
)
|
||||
{
|
||||
uint16 big5;
|
||||
uint8 plane = obj->bytes[1] - 0xA0;
|
||||
uint16 cns = ((hb & 0x7F) << 8) | (lb & 0x7F);
|
||||
if(intl_convcnstobig5(cns, plane, &big5))
|
||||
{
|
||||
*out++ = (unsigned char)((big5 >> 8) & 0xFF);
|
||||
*out = (unsigned char)(big5 & 0x00FF);
|
||||
return 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* do not assert if it failed into some range we know there are no conversion */
|
||||
XP_ASSERT(( 0x72 <= (hb & 0x7f) ) && ( 2 == plane));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
XP_ASSERT(0);
|
||||
}
|
||||
*out++ = '?'; /* error handling */
|
||||
*out = '?'; /* error handling */
|
||||
n = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
XP_ASSERT(0);
|
||||
n = 0;
|
||||
break;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE XP_Bool intl_convbig5tocns(uint16 big5, uint16* cns, uint8* cnsplane)
|
||||
{
|
||||
uint16 big5seq = BIG5TOSEQ(big5);
|
||||
uint32 l,m,r;
|
||||
|
||||
/* do binary search to the table */
|
||||
l=0;
|
||||
r= ((sizeof(big5_map) / sizeof(big5tocns))-1);
|
||||
m= (l+r)/2; ;
|
||||
|
||||
while(1)
|
||||
{
|
||||
if( (big5_map[m].big5fromseq <= big5seq ) && (big5seq <= big5_map[m].big5toseq ) )
|
||||
{
|
||||
uint16 cnsseq = big5_map[m].cnsfromseq + big5seq - big5_map[m].big5fromseq;
|
||||
*cns = SEQTOCNS(cnsseq);
|
||||
*cnsplane = big5_map[m].cnsplane;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if( (l > m) || ( m > r))
|
||||
return FALSE;
|
||||
|
||||
if( big5seq <= big5_map[m].big5fromseq )
|
||||
{
|
||||
r = m - 1;
|
||||
} else {
|
||||
l = m + 1;
|
||||
}
|
||||
m = (l+r) >> 1;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE XP_Bool intl_convcnstobig5(uint16 cns, uint8 cnsplane, uint16* big5)
|
||||
{
|
||||
uint16 cnsseq = CNSTOSEQ(cns);
|
||||
cnstobig5 *map;
|
||||
uint32 l,m,r;
|
||||
|
||||
if((cnsplane > 4) || (cnsplane <= 0 ))
|
||||
return FALSE;
|
||||
|
||||
map = cns_map[cnsplane - 1];
|
||||
|
||||
/* do binary search to the table */
|
||||
l=0;
|
||||
r= cns_map_size[cnsplane -1] - 1;
|
||||
m= (l+r)/2; ;
|
||||
|
||||
while(1)
|
||||
{
|
||||
if( (map[m].cnsfromseq <= cnsseq ) && (cnsseq <= map[m].cnstoseq ) )
|
||||
{
|
||||
uint16 big5seq = map[m].big5fromseq + cnsseq - map[m].cnsfromseq;
|
||||
*big5 = SEQTOBIG5(big5seq);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if( (l > m) || ( m > r))
|
||||
return FALSE;
|
||||
|
||||
if( cnsseq <= map[m].cnsfromseq )
|
||||
{
|
||||
r = m - 1;
|
||||
} else {
|
||||
l = m + 1;
|
||||
}
|
||||
m = (l+r) >> 1;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE uint32 intl_same_outsize(uint32 insize)
|
||||
{
|
||||
return insize + 1;
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------ */
|
||||
PRIVATE uint32 intl_x2_outsize(uint32 insize)
|
||||
{
|
||||
return 2 * insize + 1;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
PRIVATE void intl_fc_restore_conv_state( CCCDataObject obj, uint32 *st1, uint32 *st2)
|
||||
{
|
||||
|
||||
*st1 = INTL_GetCCCJismode(obj);
|
||||
*st2 = INTL_GetCCCCvtflag(obj);
|
||||
}
|
||||
/* -------------------------------------------------------------------- */
|
||||
PRIVATE void intl_fc_save_conv_state( CCCDataObject obj, uint32 st1, uint32 st2)
|
||||
{
|
||||
INTL_SetCCCJismode(obj, st1);
|
||||
INTL_SetCCCCvtflag(obj, st2);
|
||||
}
|
||||
/* -------------------------------------------------------------------- */
|
||||
PRIVATE unsigned char* intl_fc_report_out_of_memory(CCCDataObject obj)
|
||||
{
|
||||
INTL_SetCCCRetval( obj, MK_OUT_OF_MEMORY );
|
||||
return NULL;
|
||||
}
|
||||
/* -------------------------------------------------------------------- */
|
||||
PRIVATE unsigned char* intl_fc_return_buf_and_len( CCCDataObject obj, unsigned char *out, int32 outlen)
|
||||
{
|
||||
XP_ASSERT(out);
|
||||
XP_ASSERT(outlen >= 0);
|
||||
|
||||
INTL_SetCCCLen(obj, outlen);
|
||||
|
||||
return out;
|
||||
}
|
||||
/* -------------------------------------------------------------------- */
|
||||
PRIVATE unsigned char*
|
||||
intl_fc_conv_generic( CCCDataObject obj, const unsigned char *in, int32 insize, CVTable* vtbl)
|
||||
{
|
||||
|
||||
char unsigned *outbuf;
|
||||
char unsigned *out;
|
||||
int32 i;
|
||||
int32 outlen = 0;
|
||||
int32 outalloclen = 0;
|
||||
void *state;
|
||||
|
||||
XP_ASSERT(insize >= 0);
|
||||
XP_ASSERT(in);
|
||||
|
||||
/* copy the state information from CCCDataObject into state */
|
||||
{ /*
|
||||
We need to do all this because currently CCCDataObject
|
||||
static init itself in the table and there are no destroy routine
|
||||
Once we remove those bad OO code we could just use
|
||||
state as the object instead of copy date between
|
||||
CCCDataObject and sate
|
||||
*/
|
||||
uint32 st1, st2;
|
||||
vtbl->restore_conv_state(obj, &st1, &st2);
|
||||
state = vtbl->state_create();
|
||||
XP_ASSERT(NULL != state);
|
||||
vtbl->state_init(state, st1, st2);
|
||||
}
|
||||
|
||||
/* Try to allocate memory */
|
||||
outalloclen = vtbl->outsize(insize);
|
||||
XP_ASSERT(outalloclen >= 0);
|
||||
|
||||
outbuf = (unsigned char*) XP_ALLOC( outalloclen );
|
||||
|
||||
/* in case we cannot allocate memory */
|
||||
XP_ASSERT( NULL != outbuf );
|
||||
if((unsigned char*) NULL == outbuf )
|
||||
return vtbl->report_out_of_memory(obj);
|
||||
|
||||
for(out=outbuf, i = 0 ; i < insize ; i++, in++)
|
||||
{
|
||||
int32 genlen;
|
||||
if( vtbl->scan(state, *in ))
|
||||
{
|
||||
genlen = vtbl->generate(state, out);
|
||||
|
||||
XP_ASSERT( genlen >= 0 );
|
||||
|
||||
out += genlen;
|
||||
outlen += genlen;
|
||||
|
||||
/* vtbl->outsize should ensure us that this is always true */
|
||||
XP_ASSERT(outlen <= outalloclen);
|
||||
}
|
||||
}
|
||||
*out = '\0'; /* null terminate */
|
||||
|
||||
{
|
||||
uint32 st1, st2;
|
||||
vtbl->state_get_value(state, &st1, &st2);
|
||||
vtbl->save_conv_state(obj, st1, st2);
|
||||
vtbl->state_destroy(state);
|
||||
}
|
||||
|
||||
return vtbl->return_buf_and_len(obj, outbuf, out - outbuf);
|
||||
}
|
||||
/* -------------------------------------------------------------------- */
|
||||
MODULE_PRIVATE unsigned char*
|
||||
mz_euctwtob5( CCCDataObject obj, const unsigned char *in, int32 insize)
|
||||
{
|
||||
return intl_fc_conv_generic(obj, in, insize, &intl_euctw_b5_vtbl);
|
||||
}
|
||||
/* -------------------------------------------------------------------- */
|
||||
MODULE_PRIVATE unsigned char*
|
||||
mz_b5toeuctw( CCCDataObject obj, const unsigned char *in, int32 insize)
|
||||
{
|
||||
return intl_fc_conv_generic(obj, in, insize, &intl_b5_euctw_vtbl);
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* cns2b5.c */
|
||||
|
||||
|
||||
#ifdef FEATURE_BIG5CNS
|
||||
#include "cns2b5.i00"
|
||||
#else
|
||||
#ifdef OSF1
|
||||
static int dumbcc = 0; /* The 3.2 compiler aborts when there's "nothing to compile", and 4.0 warns. This fixes both problems. */
|
||||
#endif
|
||||
#endif
|
||||
@ -1,385 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
|
||||
/* Mapping table between platform code and ISO code.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char iso_code[6];
|
||||
unsigned short win_langid;
|
||||
unsigned short mac_lang;
|
||||
unsigned short mac_region;
|
||||
} ISO_Lang_Country_To_Platform;
|
||||
|
||||
static ISO_Lang_Country_To_Platform iso_mapping_table[] = {
|
||||
{"af-ZA", 0x0436, 32767, 32767},
|
||||
{"ar-AE", 0x3801, 32767, 32767},
|
||||
{"ar-BH", 0x3c01, 32767, 32767},
|
||||
{"ar-DZ", 0x1401, 32767, 32767},
|
||||
{"ar-EG", 0x0c01, 32767, 32767},
|
||||
{"ar-IQ", 0x0801, 32767, 32767},
|
||||
{"ar-JO", 0x2c01, 32767, 32767},
|
||||
{"ar-KW", 0x3401, 32767, 32767},
|
||||
{"ar-LB", 0x3001, 32767, 32767},
|
||||
{"ar-LY", 0x1001, 32767, 32767},
|
||||
{"ar-MA", 0x1801, 32767, 32767},
|
||||
{"ar-OM", 0x2001, 32767, 32767},
|
||||
{"ar-QA", 0x4001, 32767, 32767},
|
||||
{"ar-SA", 0x0401, 32767, 32767},
|
||||
{"ar-SY", 0x2801, 32767, 32767},
|
||||
{"ar-TN", 0x1c01, 32767, 32767},
|
||||
{"ar-YE", 0x2401, 32767, 32767},
|
||||
{"az-AZ", 0x042c, 32767, 32767},
|
||||
{"az-AZ", 0x082c, 32767, 32767},
|
||||
{"be-BY", 0x0423, 32767, 32767},
|
||||
{"bg-BG", 0x0402, 32767, 32767},
|
||||
{"ca-ES", 0x0403, 32767, 32767},
|
||||
{"cs-CZ", 0x0405, 32767, 32767},
|
||||
{"da-DK", 0x0406, 32767, 32767},
|
||||
{"de-AT", 0x0c07, 32767, 32767},
|
||||
{"de-CH", 0x0807, 32767, 32767},
|
||||
{"de-DE", 0x0407, 32767, 32767},
|
||||
{"de-LI", 0x1407, 32767, 32767},
|
||||
{"de-LU", 0x1007, 32767, 32767},
|
||||
{"el-GR", 0x0408, 32767, 32767},
|
||||
{"en-AU", 0x0c09, 32767, 32767},
|
||||
{"en-BZ", 0x2809, 32767, 32767},
|
||||
{"en-CA", 0x1009, 32767, 32767},
|
||||
{"en-CB", 0x2409, 32767, 32767},
|
||||
{"en-GB", 0x0809, 32767, 32767},
|
||||
{"en-IE", 0x1809, 32767, 32767},
|
||||
{"en-JM", 0x2009, 32767, 32767},
|
||||
{"en-NZ", 0x1409, 32767, 32767},
|
||||
{"en-PH", 0x3409, 32767, 32767},
|
||||
{"en-TT", 0x2c09, 32767, 32767},
|
||||
{"en-US", 0x0409, 0, 0},
|
||||
{"en-ZA", 0x1c09, 32767, 32767},
|
||||
{"en-ZW", 0x3009, 32767, 32767},
|
||||
{"es-AR", 0x2c0a, 32767, 32767},
|
||||
{"es-BO", 0x400a, 32767, 32767},
|
||||
{"es-CL", 0x340a, 32767, 32767},
|
||||
{"es-CO", 0x240a, 32767, 32767},
|
||||
{"es-CR", 0x140a, 32767, 32767},
|
||||
{"es-DO", 0x1c0a, 32767, 32767},
|
||||
{"es-EC", 0x300a, 32767, 32767},
|
||||
{"es-ES", 0x040a, 32767, 32767},
|
||||
{"es-ES", 0x0c0a, 32767, 32767},
|
||||
{"es-GT", 0x100a, 32767, 32767},
|
||||
{"es-HN", 0x480a, 32767, 32767},
|
||||
{"es-MX", 0x080a, 32767, 32767},
|
||||
{"es-NI", 0x4c0a, 32767, 32767},
|
||||
{"es-PA", 0x180a, 32767, 32767},
|
||||
{"es-PE", 0x280a, 32767, 32767},
|
||||
{"es-PR", 0x500a, 32767, 32767},
|
||||
{"es-PY", 0x3c0a, 32767, 32767},
|
||||
{"es-SV", 0x440a, 32767, 32767},
|
||||
{"es-UY", 0x380a, 32767, 32767},
|
||||
{"es-VE", 0x200a, 32767, 32767},
|
||||
{"et-EE", 0x0425, 32767, 32767},
|
||||
{"eu-ES", 0x042d, 32767, 32767},
|
||||
{"fa-IR", 0x0429, 32767, 32767},
|
||||
{"fi-FI", 0x040b, 32767, 32767},
|
||||
{"fo-FO", 0x0438, 32767, 32767},
|
||||
{"fr-BE", 0x080c, 32767, 32767},
|
||||
{"fr-CA", 0x0c0c, 32767, 32767},
|
||||
{"fr-CH", 0x100c, 32767, 32767},
|
||||
{"fr-FR", 0x040c, 32767, 32767},
|
||||
{"fr-LU", 0x140c, 32767, 32767},
|
||||
{"fr-MC", 0x180c, 32767, 32767},
|
||||
{"hr-HR", 0x041a, 32767, 32767},
|
||||
{"hu-HU", 0x040e, 32767, 32767},
|
||||
{"id-ID", 0x0421, 32767, 32767},
|
||||
{"is-IS", 0x040f, 32767, 32767},
|
||||
{"it-CH", 0x0810, 32767, 32767},
|
||||
{"it-IT", 0x0410, 32767, 32767},
|
||||
{"iw-IL", 0x040d, 32767, 32767},
|
||||
{"ja-JP", 0x0411, 32767, 32767},
|
||||
{"kk-KZ", 0x043f, 32767, 32767},
|
||||
{"ko-KR", 0x0412, 32767, 32767},
|
||||
{"lt-LT", 0x0427, 32767, 32767},
|
||||
{"lt-LT", 0x0827, 32767, 32767},
|
||||
{"lv-LV", 0x0426, 32767, 32767},
|
||||
{"mk-MK", 0x042f, 32767, 32767},
|
||||
{"ms-BN", 0x083e, 32767, 32767},
|
||||
{"ms-MY", 0x043e, 32767, 32767},
|
||||
{"nl-BE", 0x0813, 32767, 32767},
|
||||
{"nl-NL", 0x0413, 32767, 32767},
|
||||
{"no-NO", 0x0414, 32767, 32767},
|
||||
{"no-NO", 0x0814, 32767, 32767},
|
||||
{"pl-PL", 0x0415, 32767, 32767},
|
||||
{"pt-BR", 0x0416, 32767, 32767},
|
||||
{"pt-PT", 0x0816, 32767, 32767},
|
||||
{"ro-RO", 0x0418, 32767, 32767},
|
||||
{"ru-RU", 0x0419, 32767, 32767},
|
||||
{"sk-SK", 0x041b, 32767, 32767},
|
||||
{"sl-SI", 0x0424, 32767, 32767},
|
||||
{"sq-AL", 0x041c, 32767, 32767},
|
||||
{"sr-SP", 0x081a, 32767, 32767},
|
||||
{"sr-SP", 0x0c1a, 32767, 32767},
|
||||
{"sv-FI", 0x081d, 32767, 32767},
|
||||
{"sv-SE", 0x041d, 32767, 32767},
|
||||
{"sw-KE", 0x0441, 32767, 32767},
|
||||
{"th-TH", 0x041e, 32767, 32767},
|
||||
{"tr-TR", 0x041f, 32767, 32767},
|
||||
{"tt-TA", 0x0444, 32767, 32767},
|
||||
{"uk-UA", 0x0422, 32767, 32767},
|
||||
{"ur-PK", 0x0420, 32767, 32767},
|
||||
{"uz-UZ", 0x0443, 32767, 32767},
|
||||
{"uz-UZ", 0x0843, 32767, 32767},
|
||||
{"vi-VN", 0x042a, 32767, 32767},
|
||||
{"zh-CN", 0x0804, 32767, 32767},
|
||||
{"zh-HK", 0x0c04, 32767, 32767},
|
||||
{"zh-MO", 0x1404, 32767, 32767},
|
||||
{"zh-SG", 0x1004, 32767, 32767},
|
||||
{"zh-TW", 0x0404, 32767, 32767},
|
||||
{"", 0, 0, 0}
|
||||
};
|
||||
|
||||
|
||||
|
||||
static XP_Bool MatchPlatformId(ISO_Lang_Country_To_Platform *entry, XP_Bool bLanguage,
|
||||
unsigned short platformIdNum, char *platformIdStr)
|
||||
{
|
||||
#if defined(XP_WIN)
|
||||
return platformIdNum == entry->win_langid;
|
||||
#elif defined(XP_MAC)
|
||||
return bLanguage ? (platformIdNum == entry->mac_lang) : (platformIdNum == entry->mac_region);
|
||||
#elif defined(XP_UNIX)
|
||||
/* implement XFE code here */
|
||||
#endif
|
||||
XP_ASSERT(0); /* platform not supported */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static XP_Bool MatchISOCode(ISO_Lang_Country_To_Platform *entry, char *ISOCode)
|
||||
{
|
||||
return (XP_STRCMP(entry->iso_code, ISOCode) == 0);
|
||||
}
|
||||
|
||||
PUBLIC const char *INTL_PlatformIdToISOCode(unsigned short platformIdNum, char *platformIdStr, XP_Bool bLanguage)
|
||||
{
|
||||
ISO_Lang_Country_To_Platform *tmpPtr = iso_mapping_table;
|
||||
|
||||
|
||||
while (tmpPtr->iso_code[0])
|
||||
{
|
||||
if (MatchPlatformId(tmpPtr, bLanguage, platformIdNum, platformIdStr))
|
||||
break;
|
||||
tmpPtr++;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#ifdef XP_WIN
|
||||
/* Not found in the table, this is usually ok as EnumSystemLocales() passes unavailable langid
|
||||
* even called with LCID_INSTALLED.
|
||||
* For debugging, we verify by calling GetLocaleInfo(). If that API works then it means the table is missing the entry.
|
||||
*/
|
||||
if(!tmpPtr->iso_code[0])
|
||||
{
|
||||
char locale_string[128];
|
||||
|
||||
XP_ASSERT( GetLocaleInfo(platformIdNum, LOCALE_SENGLANGUAGE,
|
||||
locale_string, sizeof(locale_string)) == 0 );
|
||||
}
|
||||
#else
|
||||
XP_ASSERT(tmpPtr->iso_code[0]);
|
||||
#endif
|
||||
#endif /* DEBUG */
|
||||
|
||||
return tmpPtr->iso_code;
|
||||
}
|
||||
|
||||
PUBLIC char *INTL_GetLanguageCountry(INTL_LanguageCountry_Selector selector)
|
||||
{
|
||||
/* return constants until FE implemented */
|
||||
#if defined(XP_WIN)
|
||||
return FE_GetLanguageCountry(selector);
|
||||
#else
|
||||
switch (selector)
|
||||
{
|
||||
case INTL_LanguageSel:
|
||||
case INTL_LanguageCollateSel:
|
||||
case INTL_LanguageMonetarySel:
|
||||
case INTL_LanguageNumericSel:
|
||||
case INTL_LanguageTimeSel:
|
||||
return XP_STRDUP("en");
|
||||
case INTL_CountrySel:
|
||||
case INTL_CountryCollateSel:
|
||||
case INTL_CountryMonetarySel:
|
||||
case INTL_CountryNumericSel:
|
||||
case INTL_CountryTimeSel:
|
||||
return XP_STRDUP("US");
|
||||
case INTL_ALL_LocalesSel:
|
||||
return XP_STRDUP("en-US,en-GB,fr-FR");
|
||||
default:
|
||||
return XP_STRDUP("");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* FE implementations, for now put them here for potability. */
|
||||
#if defined(XP_WIN)
|
||||
/* Definitions of states to check if API supports ISO code. */
|
||||
typedef enum
|
||||
{
|
||||
kAPI_ISONAME_NotInitialzied,
|
||||
kAPI_ISONAME_Supported,
|
||||
kAPI_ISONAME_NotSupported
|
||||
} STATE_API_Support_ISONAME;
|
||||
|
||||
static STATE_API_Support_ISONAME bAPI_Support_ISONAME = kAPI_ISONAME_NotInitialzied;
|
||||
static BOOL API_Support_ISONAME()
|
||||
{
|
||||
char locale_string[128];
|
||||
|
||||
return GetLocaleInfo(GetUserDefaultLCID(), LOCALE_SISO639LANGNAME,
|
||||
locale_string, sizeof(locale_string)) != 0;
|
||||
}
|
||||
|
||||
/* Variables and callbacks for construct a string of all installed locales. */
|
||||
static char *locale_buf = NULL;
|
||||
static int locale_num =0;
|
||||
BOOL CALLBACK EnumLocalesProc0(LPTSTR lpLocaleString)
|
||||
{
|
||||
char locale_string[128];
|
||||
char *endptr;
|
||||
LCID lcid = (LCID) strtol(lpLocaleString, &endptr, 16); /* the argument is in hex string */
|
||||
|
||||
if (GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, locale_string, sizeof(locale_string)))
|
||||
locale_num++;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString)
|
||||
{
|
||||
char locale_string[128];
|
||||
char *endptr;
|
||||
LCID lcid = (LCID) strtol(lpLocaleString, &endptr, 16); /* the argument is in hex string */
|
||||
|
||||
if (bAPI_Support_ISONAME == kAPI_ISONAME_Supported)
|
||||
{
|
||||
if (GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, locale_string, sizeof(locale_string)))
|
||||
{
|
||||
XP_STRCAT(locale_buf, locale_string);
|
||||
XP_STRCAT(locale_buf, "-");
|
||||
if (GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, locale_string, sizeof(locale_string)))
|
||||
{
|
||||
XP_STRCAT(locale_buf, locale_string);
|
||||
XP_STRCAT(locale_buf, ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *iso_code = INTL_PlatformIdToISOCode((unsigned short) LANGIDFROMLCID(lcid), NULL, TRUE);
|
||||
if (iso_code && iso_code[0])
|
||||
{
|
||||
XP_STRCAT(locale_buf, iso_code);
|
||||
XP_STRCAT(locale_buf, ",");
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static const char *GetAllLocales(void)
|
||||
{
|
||||
int len;
|
||||
|
||||
/* It it possible to re-use the buffer if NT4 or earlier since locales cannot be added
|
||||
* while the Navigator is running.
|
||||
*/
|
||||
XP_FREEIF(locale_buf);
|
||||
locale_num = 0;
|
||||
|
||||
/* get length and allocate a buffer */
|
||||
(void) EnumSystemLocales(EnumLocalesProc0, LCID_INSTALLED);
|
||||
locale_buf = (char *) XP_ALLOC(locale_num * 6 + 1);
|
||||
if (locale_buf == NULL)
|
||||
return "";
|
||||
locale_buf[0] = '\0';
|
||||
/* copy locale info to the buffer */
|
||||
(void) EnumSystemLocales(EnumLocalesProc, LCID_INSTALLED);
|
||||
/* trim the last comma */
|
||||
len = XP_STRLEN(locale_buf);
|
||||
if (len >= 1)
|
||||
locale_buf[len-1] = '\0';
|
||||
|
||||
return (const char *) locale_buf;
|
||||
}
|
||||
|
||||
char *FE_GetLanguageCountry(INTL_LanguageCountry_Selector selector)
|
||||
{
|
||||
char *name = NULL;
|
||||
char locale_string[128];
|
||||
LCID lcid = GetUserDefaultLCID();
|
||||
|
||||
/* check if the API supports the ISO code output */
|
||||
if (bAPI_Support_ISONAME == kAPI_ISONAME_NotInitialzied)
|
||||
bAPI_Support_ISONAME = API_Support_ISONAME() ? kAPI_ISONAME_Supported : kAPI_ISONAME_NotSupported;
|
||||
|
||||
switch (selector)
|
||||
{
|
||||
case INTL_LanguageSel:
|
||||
case INTL_LanguageCollateSel:
|
||||
case INTL_LanguageMonetarySel:
|
||||
case INTL_LanguageNumericSel:
|
||||
case INTL_LanguageTimeSel:
|
||||
if (bAPI_Support_ISONAME == kAPI_ISONAME_Supported)
|
||||
{
|
||||
if (GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, locale_string, sizeof(locale_string)) > 0)
|
||||
name = XP_STRDUP(locale_string);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = (char *) INTL_PlatformIdToISOCode((unsigned short) LANGIDFROMLCID(lcid), NULL, TRUE);
|
||||
XP_ASSERT(name && XP_STRLEN(name)==5);
|
||||
name = XP_STRDUP(XP_STRNCPY_SAFE(locale_string, name, 3)); /* copy language */
|
||||
}
|
||||
break;
|
||||
case INTL_CountrySel:
|
||||
case INTL_CountryCollateSel:
|
||||
case INTL_CountryMonetarySel:
|
||||
case INTL_CountryNumericSel:
|
||||
case INTL_CountryTimeSel:
|
||||
if (bAPI_Support_ISONAME == kAPI_ISONAME_Supported)
|
||||
{
|
||||
if (GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, locale_string, sizeof(locale_string)) > 0)
|
||||
name = XP_STRDUP(locale_string);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = (char *) INTL_PlatformIdToISOCode((unsigned short) LANGIDFROMLCID(lcid), NULL, FALSE);
|
||||
XP_ASSERT(name && XP_STRLEN(name)==5);
|
||||
name = XP_STRDUP(XP_STRNCPY_SAFE(locale_string, &name[3], 3)); /* copy country */
|
||||
}
|
||||
break;
|
||||
case INTL_ALL_LocalesSel:
|
||||
name = XP_STRDUP(GetAllLocales());
|
||||
break;
|
||||
default:
|
||||
name = XP_STRDUP("");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return name;
|
||||
}
|
||||
#endif /* XP_WIN */
|
||||
@ -1,213 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* csnamefn.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
extern csname2id_t csname2id_tbl[];
|
||||
|
||||
/* for XP_GetString() */
|
||||
#include "xpgetstr.h"
|
||||
extern int XP_DOCINFO_1;
|
||||
extern int XP_DOCINFO_2;
|
||||
extern int XP_DOCINFO_3;
|
||||
extern int XP_DOCINFO_4;
|
||||
|
||||
/*#include "allxpstr.h"*/
|
||||
|
||||
PUBLIC int16
|
||||
INTL_CharSetNameToID(char *charset)
|
||||
{
|
||||
csname2id_t *csn2idp;
|
||||
int16 csid;
|
||||
|
||||
/* Parse the URL charset string for the charset ID.
|
||||
* If no MIME Content-Type charset pararm., default.
|
||||
* HTML specifies ASCII, but let user override cuz
|
||||
* of prior conventions (i.e. Japan).
|
||||
*/
|
||||
csn2idp = csname2id_tbl;
|
||||
csid = csn2idp->cs_id; /* 1st entry is default codeset ID */
|
||||
|
||||
if (charset != NULL) { /* Linear search for charset string */
|
||||
while (*(csn2idp->cs_name) != '\0') {
|
||||
if (strcasecomp(charset, (char *)csn2idp->cs_name) == 0) {
|
||||
return(csn2idp->cs_id);
|
||||
}
|
||||
csn2idp++;
|
||||
}
|
||||
}
|
||||
return(csn2idp->cs_id); /* last entry is CS_UNKNOWN */
|
||||
}
|
||||
PUBLIC unsigned char *INTL_CsidToCharsetNamePt(int16 csid)
|
||||
{
|
||||
csname2id_t *csn2idp;
|
||||
|
||||
csid &= ~CS_AUTO;
|
||||
csn2idp = &csname2id_tbl[1]; /* First one is reserved, skip it. */
|
||||
csid &= 0xff;
|
||||
|
||||
/* Linear search for charset string */
|
||||
while (*(csn2idp->cs_name) != '\0') {
|
||||
if ((csn2idp->cs_id & 0xff) == csid)
|
||||
return csn2idp->cs_name;
|
||||
csn2idp++;
|
||||
}
|
||||
return (unsigned char *)"";
|
||||
}
|
||||
|
||||
PUBLIC unsigned char *INTL_CsidToJavaCharsetNamePt(int16 csid)
|
||||
{
|
||||
csname2id_t *csn2idp;
|
||||
|
||||
csn2idp = &csname2id_tbl[1]; /* First one is reserved, skip it. */
|
||||
csid &= 0xff;
|
||||
|
||||
/* Linear search for charset string */
|
||||
while (*(csn2idp->cs_name) != '\0') {
|
||||
if ((csn2idp->cs_id & 0xff) == csid)
|
||||
return csn2idp->java_name;
|
||||
csn2idp++;
|
||||
}
|
||||
return (unsigned char *)"";
|
||||
}
|
||||
|
||||
|
||||
PUBLIC void
|
||||
INTL_CharSetIDToName(int16 csid, char *charset)
|
||||
{
|
||||
if (charset) {
|
||||
strcpy(charset,(char *)INTL_CsidToCharsetNamePt(csid));
|
||||
}
|
||||
}
|
||||
|
||||
PUBLIC const char*
|
||||
INTL_CharsetCorrection(const char* charsetname)
|
||||
{
|
||||
int16 csid = INTL_CharSetNameToID(charsetname);
|
||||
if((CS_GB2312_11 == csid) || (CS_GB2312 == csid))
|
||||
return (char*) INTL_CsidToCharsetNamePt(CS_GB_8BIT);
|
||||
if((CS_KSC5601 == csid) || (CS_KSC5601_11 == csid))
|
||||
return (char*) INTL_CsidToCharsetNamePt(CS_KSC_8BIT);
|
||||
if(CS_X_BIG5 == csid)
|
||||
return (char*) INTL_CsidToCharsetNamePt(CS_BIG5);
|
||||
return NULL;
|
||||
}
|
||||
PUBLIC void
|
||||
INTL_CharSetIDToJavaName(int16 csid, char *charset)
|
||||
{
|
||||
if (charset) {
|
||||
strcpy(charset,(char *)INTL_CsidToJavaCharsetNamePt(csid));
|
||||
}
|
||||
}
|
||||
|
||||
PUBLIC const char* PR_CALLBACK
|
||||
INTL_CharSetIDToJavaCharSetName(int16 csid) {
|
||||
return (char *)INTL_CsidToJavaCharsetNamePt(csid);
|
||||
}
|
||||
|
||||
PUBLIC char *
|
||||
INTL_CharSetDocInfo(iDocumentContext context)
|
||||
{
|
||||
INTL_CharSetInfo c = LO_GetDocumentCharacterSetInfo(context);
|
||||
register int16 doc_csid = INTL_GetCSIDocCSID(c);
|
||||
register csname2id_t *csn2idp;
|
||||
char *s = NULL;
|
||||
int detected = 0;
|
||||
|
||||
if (doc_csid == CS_DEFAULT) {
|
||||
doc_csid = INTL_DefaultDocCharSetID(context) & ~CS_AUTO; /* Get CSID from prefs */
|
||||
} else if (doc_csid & CS_AUTO) {
|
||||
doc_csid &= ~CS_AUTO; /* mask off bit for name lookup */
|
||||
detected = 1;
|
||||
} else {
|
||||
StrAllocCopy(s, INTL_GetCSIMimeCharset(c)); /* string from MIME header */
|
||||
|
||||
if (doc_csid == CS_UNKNOWN)
|
||||
StrAllocCat(s, XP_GetString(XP_DOCINFO_1));
|
||||
return(s);
|
||||
}
|
||||
/* Look up name for default & autodetected CSIDs */
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
csn2idp = &csname2id_tbl[1] ; /* skip first default one */
|
||||
for (; *(csn2idp->cs_name) != '\0'; csn2idp++)
|
||||
#else
|
||||
for (csn2idp = csname2id_tbl; *(csn2idp->cs_name) != '\0'; csn2idp++)
|
||||
#endif
|
||||
{
|
||||
if (doc_csid == csn2idp->cs_id) {
|
||||
StrAllocCopy(s, (char *)csn2idp->cs_name);
|
||||
if (detected)
|
||||
StrAllocCat(s, XP_GetString(XP_DOCINFO_2));
|
||||
else
|
||||
StrAllocCat(s, XP_GetString(XP_DOCINFO_3));
|
||||
return(s);
|
||||
}
|
||||
}
|
||||
StrAllocCopy(s, INTL_GetCSIMimeCharset(c)); /* string from MIME header */
|
||||
StrAllocCat(s, XP_GetString(XP_DOCINFO_4));
|
||||
return (s);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
|
||||
|
||||
/*
|
||||
This routine will change the default URL charset to
|
||||
newCharset, BTW newCharset is passed from UI.
|
||||
*/
|
||||
void
|
||||
FE_ChangeURLCharset(const char *charset)
|
||||
{
|
||||
csname2id_t *csn2idp;
|
||||
char *cp;
|
||||
|
||||
if (charset == NULL)
|
||||
return;
|
||||
|
||||
csn2idp = csname2id_tbl;
|
||||
|
||||
cp = (char *)charset;
|
||||
if (cp)
|
||||
while (*cp != '\0') {
|
||||
*cp = tolower(*cp);
|
||||
cp++;
|
||||
}
|
||||
|
||||
while (*(csn2idp->cs_name) != '\0') {
|
||||
if (strcasecomp(charset, (char *)csn2idp->cs_name) == 0) {
|
||||
INTL_ChangeDefaultCharSetID(csn2idp->cs_id);
|
||||
return;
|
||||
}
|
||||
csn2idp++;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
INTL_ChangeDefaultCharSetID(int16 csid)
|
||||
{
|
||||
csname2id_tbl[0].cs_id = csid;
|
||||
}
|
||||
|
||||
#endif /* XP_WIN */
|
||||
|
||||
|
||||
|
||||
@ -1,349 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* csnametb.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
/* Charset names and aliases from RFC 1700. Also encloded equivelend Java encoding names. Names are case
|
||||
* insenstive. Currently searches table linearly, so keep commonly used names at the beginning.
|
||||
*/
|
||||
MODULE_PRIVATE csname2id_t csname2id_tbl[] = {
|
||||
/* default if not specified */
|
||||
{"x-default", "", CS_DEFAULT}, /* or unknown charset */
|
||||
|
||||
{"us-ascii", "8859_1", CS_ASCII},
|
||||
{"iso-8859-1", "8859_1", CS_LATIN1},
|
||||
{"iso-2022-jp", "JIS", CS_JIS},
|
||||
{"iso-2022-jp-2", "JIS", CS_JIS}, /* treat same as iso-2022-jp*/
|
||||
{"Shift_JIS", "SJIS", CS_SJIS},
|
||||
{"euc-jp", "EUC", CS_EUCJP},
|
||||
{"jis_x0208-1983", "JIS0208", CS_JISX0208},
|
||||
{"x-jisx0208-11", "JIS0208", CS_JISX0208_11},
|
||||
{"jis_x0201", "JIS0208", CS_JISX0201},
|
||||
{"jis_x0212-1990", "JIS0208", CS_JISX0212},
|
||||
{"x-mac-roman", "MacRoman", CS_MAC_ROMAN},
|
||||
{"iso-8859-2", "8859_2", CS_LATIN2},
|
||||
{"iso-8859-3", "8859_3", CS_8859_3},
|
||||
{"iso-8859-4", "8859_4", CS_8859_4},
|
||||
{"iso-8859-5", "8859_5", CS_8859_5},
|
||||
{"iso-8859-6", "8859_6", CS_8859_6},
|
||||
{"iso-8859-7", "8859_7", CS_8859_7},
|
||||
{"iso-8859-8", "8859_8", CS_8859_8},
|
||||
{"iso-8859-9", "8859_9", CS_8859_9},
|
||||
{"x-mac-ce", "MacCentralEurope", CS_MAC_CE},
|
||||
{"EUC-KR", "KSC5601", CS_KSC_8BIT}, /* change to UPPER case per Jungshik Shin <jshin@pantheon.yale.edu> request to work around Korean SendMail Decode bug */
|
||||
{"ks_c_5601-1987", "KSC5601", CS_KSC5601},
|
||||
{"x-ksc5601-11", "KSC5601", CS_KSC5601_11},
|
||||
{"gb2312", "GB2312", CS_GB_8BIT},
|
||||
{"gb_2312-80", "GB2312", CS_GB2312},
|
||||
{"x-gb2312-11", "GB2312", CS_GB2312_11},
|
||||
{"x-euc-tw", "", CS_CNS_8BIT},
|
||||
{"x-cns11643-1", "CNS11643", CS_CNS11643_1},
|
||||
{"x-cns11643-2", "CNS11643", CS_CNS11643_2},
|
||||
{"x-cns11643-1110", "CNS11643", CS_CNS11643_1110},
|
||||
{"iso-2022-kr", "KR2022", CS_2022_KR},
|
||||
{"big5", "Big5", CS_BIG5},
|
||||
{"x-x-big5", "Big5", CS_X_BIG5},
|
||||
{"tis-620", "TIS620", CS_TIS620},
|
||||
{"adobe-symbol-encoding", "Symbol", CS_SYMBOL},
|
||||
{"x-dingbats", "DingBats", CS_DINGBATS},
|
||||
{"x-dectech", "DECTECH", CS_DECTECH},
|
||||
{"koi8-r", "KOI8", CS_KOI8_R},
|
||||
{"x-mac-cyrillic", "MacCyrillic", CS_MAC_CYRILLIC},
|
||||
{"x-mac-greek", "MacGreek", CS_MAC_GREEK},
|
||||
{"x-mac-turkish", "MacTurkish", CS_MAC_TURKISH},
|
||||
{"windows-1250", "Cp1250", CS_CP_1250},
|
||||
{"windows-1251", "Cp1251", CS_CP_1251}, /* cyrillic */
|
||||
{"windows-1253", "Cp1253", CS_CP_1253}, /* greek */
|
||||
{"windows-1258", "Cp1258", CS_CP_1258},
|
||||
{"UTF-8", "UTF8", CS_UTF8},
|
||||
{"UTF-7", "UTF7", CS_UTF7},
|
||||
{"ISO-10646-UCS-2", "UCS2", CS_UCS2},
|
||||
{"ISO-10646-UCS-4", "UCS4", CS_UCS4},
|
||||
{"x-imap4-modified-utf7", "", CS_IMAP4_UTF7},
|
||||
{"armscii-8", "", CS_ARMSCII8},
|
||||
{"HZ-GB-2312", "", CS_HZ},
|
||||
{"ISO-2022-CN", "", CS_ISO_2022_CN},
|
||||
{"x-gb13000", "", CS_GB13000},
|
||||
{"x-big5-plus", "", CS_BIG5_PLUS},
|
||||
{"x-UHC", "", CS_UHC }, /* cp 949 */
|
||||
{"x-cns11643-3", "", CS_CNS11643_3},
|
||||
{"x-cns11643-4", "", CS_CNS11643_4},
|
||||
{"x-cns11643-5", "", CS_CNS11643_5},
|
||||
{"x-cns11643-6", "", CS_CNS11643_6},
|
||||
{"x-cns11643-7", "", CS_CNS11643_7},
|
||||
{"x-cns11643-8", "", CS_CNS11643_8},
|
||||
{"x-cns11643-9", "", CS_CNS11643_9},
|
||||
{"x-cns11643-10", "", CS_CNS11643_10},
|
||||
{"x-cns11643-11", "", CS_CNS11643_11},
|
||||
{"x-cns11643-12", "", CS_CNS11643_12},
|
||||
{"x-cns11643-13", "", CS_CNS11643_13},
|
||||
{"x-cns11643-14", "", CS_CNS11643_14},
|
||||
{"x-cns11643-15", "", CS_CNS11643_15},
|
||||
{"x-cns11643-16", "", CS_CNS11643_16},
|
||||
{"VISCII", "", CS_VIET_VISCII},
|
||||
{"VIQR", "", CS_VIET_VIQR},
|
||||
{"koi8-u", "", CS_KOI8_U},
|
||||
{"iso-ir-111", "", CS_ISO_IR_111},
|
||||
{"iso_8859-6-e", "", CS_8859_6_E},
|
||||
{"iso_8859-6-i", "", CS_8859_6_I},
|
||||
{"iso_8859-8-e", "", CS_8859_8_E},
|
||||
{"iso_8859-8-i", "", CS_8859_8_I},
|
||||
{"x-johab", "", CS_JOHAB}, /* CP 1361 */
|
||||
{"x-johabfont", "", CS_JOHABFONT}, /* hangterm johab font */
|
||||
{"x-viet-vps", "", CS_VIET_VPS},
|
||||
{"x-viet-tcvn", "", CS_VIET_TCVN},
|
||||
{"x-viet-vni", "", CS_VIET_VNI},
|
||||
{"T.61-8bit", "", CS_T61},
|
||||
|
||||
/* Additional OS/2 codepages. These are IANA primary names */
|
||||
{"ibm850", "Cp850", CS_CP_850}, /* PC Latin 1 */
|
||||
{"ibm852", "Cp852", CS_CP_852}, /* PC Latin 2 */
|
||||
{"ibm855", "Cp855", CS_CP_855}, /* PC Cyrillic */
|
||||
{"ibm857", "Cp857", CS_CP_857}, /* PC Turkish */
|
||||
{"ibm862", "Cp862", CS_CP_862}, /* PC Hebrew */
|
||||
{"ibm864", "Cp864", CS_CP_864}, /* PC Arabic */
|
||||
{"ibm866", "Cp866", CS_CP_866}, /* PC Russian */
|
||||
{"ibm874", "Cp874", CS_CP_874}, /* PC Thai */
|
||||
{"windows-1257", "Cp1257", CS_CP_1257}, /* Windows Baltic */
|
||||
|
||||
/* OS/2 IANA alias entries */
|
||||
{"cp850", "", CS_CP_850}, /* PC Latin 1 */
|
||||
{"cp852", "", CS_CP_852}, /* PC Latin 2 */
|
||||
{"cp857", "", CS_CP_857}, /* PC Turkish */
|
||||
{"cp862", "", CS_CP_862}, /* PC Hebrew */
|
||||
{"cp864", "", CS_CP_864}, /* PC Arabic */
|
||||
{"cp874", "", CS_CP_874}, /* PC Thai */
|
||||
|
||||
/* aliases for us-ascii: */
|
||||
{"ansi_x3.4-1968", "", CS_ASCII},
|
||||
{"iso-ir-6", "", CS_ASCII},
|
||||
{"ansi_x3.4-1986", "", CS_ASCII},
|
||||
{"iso_646.irv:1991", "", CS_ASCII},
|
||||
{"ascii", "", CS_ASCII},
|
||||
{"iso646-us", "", CS_ASCII},
|
||||
{"us", "", CS_ASCII},
|
||||
{"ibm367", "", CS_ASCII},
|
||||
{"cp367", "", CS_ASCII},
|
||||
{"csASCII", "", CS_ASCII},
|
||||
|
||||
/* aliases for iso_8859-1: */
|
||||
{"latin1", "", CS_LATIN1},
|
||||
{"iso_8859-1", "", CS_LATIN1},
|
||||
{"iso_8859-1:1987", "", CS_LATIN1},
|
||||
{"iso-ir-100", "", CS_LATIN1},
|
||||
{"l1", "", CS_LATIN1},
|
||||
{"ibm819", "", CS_LATIN1},
|
||||
{"cp819", "", CS_LATIN1},
|
||||
{"ISO-8859-1-Windows-3.0-Latin-1", "", CS_LATIN1},
|
||||
{"ISO-8859-1-Windows-3.1-Latin-1", "", CS_LATIN1},
|
||||
{"windows-1252", "Cp1252", CS_LATIN1},
|
||||
|
||||
/* aliases for ISO_8859-2: */
|
||||
{"latin2", "", CS_LATIN2},
|
||||
{"iso_8859-2", "", CS_LATIN2},
|
||||
{"iso_8859-2:1987", "", CS_LATIN2},
|
||||
{"iso-ir-101", "", CS_LATIN2},
|
||||
{"l2", "", CS_LATIN2},
|
||||
{"ISO-8859-2-Windows-Latin-2", "", CS_LATIN2},
|
||||
|
||||
/* aliases for KS_C_5601-1987: */
|
||||
{"ks_c_5601-1987", "", CS_KSC5601},
|
||||
{"iso-ir-149", "", CS_KSC5601},
|
||||
{"ks_c_5601-1989", "", CS_KSC5601},
|
||||
{"ksc_5601", "", CS_KSC5601},
|
||||
{"ks_c_5601", "", CS_KSC5601},
|
||||
{"korean", "", CS_KSC5601},
|
||||
{"csKSC56011987", "", CS_KSC5601},
|
||||
|
||||
/* aliases for iso-2022-kr: */
|
||||
{"csISO2022KR", "", CS_2022_KR},
|
||||
|
||||
/* aliases for euc-kr: */
|
||||
{"csEUCKR", "", CS_KSC_8BIT},
|
||||
|
||||
/* aliases for iso-2022-jp: */
|
||||
{"csISO2022JP", "", CS_JIS},
|
||||
|
||||
/* aliases for iso-2022-jp-2: */
|
||||
{"csISO2022JP2", "", CS_JIS},
|
||||
|
||||
/* aliases for GB_2312-80: */
|
||||
{"iso-ir-58", "", CS_GB2312},
|
||||
{"chinese", "", CS_GB2312},
|
||||
{"csISO58GB231280", "", CS_GB2312},
|
||||
|
||||
/* aliases for gb2312: */
|
||||
{"csGB2312", "", CS_GB_8BIT},
|
||||
{"CN-GB", "", CS_GB_8BIT}, /* Simplified Chinese */
|
||||
{"CN-GB-ISOIR165", "", CS_GB_8BIT}, /* Simplified Chinese */
|
||||
|
||||
/* aliases for big5: */
|
||||
{"csBig5", "", CS_BIG5},
|
||||
{"CN-Big5", "", CS_BIG5}, /* Traditional Chinese */
|
||||
|
||||
/* aliases for iso-8859-7: */
|
||||
{"iso-ir-126", "", CS_8859_7},
|
||||
{"iso_8859-7", "", CS_8859_7},
|
||||
{"iso_8859-7:1987", "", CS_8859_7},
|
||||
{"elot_928", "", CS_8859_7},
|
||||
{"ecma-118", "", CS_8859_7},
|
||||
{"greek", "", CS_8859_7},
|
||||
{"greek8", "", CS_8859_7},
|
||||
{"csISOLatinGreek", "", CS_8859_7},
|
||||
|
||||
/* aliases for iso-8859-5: */
|
||||
{"iso-ir-144", "", CS_8859_5},
|
||||
{"iso_8859-5", "", CS_8859_5},
|
||||
{"iso_8859-5:1988", "", CS_8859_5},
|
||||
{"cyrillic", "", CS_8859_5},
|
||||
{"csISOLatinCyrillic", "", CS_8859_5},
|
||||
|
||||
/* aliases for jis_x0212-1990: */
|
||||
{"x0212", "", CS_JISX0212},
|
||||
{"iso-ir-159", "", CS_JISX0212},
|
||||
{"csISO159JISX02121990", "", CS_JISX0212},
|
||||
|
||||
/* aliases for jis_x0201: */
|
||||
{"x0201", "", CS_JISX0201},
|
||||
{"csHalfWidthKatakana", "", CS_JISX0201},
|
||||
|
||||
/* aliases for koi8-r: */
|
||||
{"csKOI8R", "", CS_KOI8_R},
|
||||
|
||||
/* aliases for koi8-u: */
|
||||
{"koi8-ru", "", CS_KOI8_U},
|
||||
|
||||
/* aliases for Shift_JIS: */
|
||||
{"x-sjis", "", CS_SJIS},
|
||||
{"ms_Kanji", "", CS_SJIS},
|
||||
{"csShiftJIS", "", CS_SJIS},
|
||||
{"Windows-31J", "", CS_SJIS},
|
||||
|
||||
/* aliases for x-euc-jp: */
|
||||
{"Extended_UNIX_Code_Packed_Format_for_Japanese", "", CS_EUCJP},
|
||||
{"csEUCPkdFmtJapanese", "", CS_EUCJP},
|
||||
{"x-euc-jp", "", CS_EUCJP},
|
||||
|
||||
/* aliases for adobe-symbol-encoding: */
|
||||
{"csHPPSMath", "", CS_SYMBOL},
|
||||
|
||||
/* aliases for iso-8859-5-windows-latin-5: */
|
||||
{"csWindows31Latin5", "", CS_CP_1251},
|
||||
{"iso-8859-5-windows-latin-5", "", CS_CP_1251},
|
||||
{"x-cp1251", "", CS_CP_1251},
|
||||
|
||||
/* aliases for windows-1250: */
|
||||
{"x-cp1250", "", CS_CP_1250},
|
||||
|
||||
/* aliases for windows-1253: */
|
||||
{"x-cp1253", "", CS_CP_1253},
|
||||
|
||||
/* aliases for windows-1254: */
|
||||
{"windows-1254", "", CS_8859_9}, /* turkish */
|
||||
|
||||
/* aliases for UNICODE-1-1: */
|
||||
{"csUnicode", "", CS_UCS2},
|
||||
{"csUnicode11", "", CS_UCS2},
|
||||
{"ISO-10646-UCS-BASIC", "", CS_UCS2},
|
||||
{"csUnicodeASCII", "", CS_UCS2},
|
||||
{"ISO-10646-Unicode-Latin1", "", CS_UCS2},
|
||||
{"csUnicodeLatin1", "", CS_UCS2},
|
||||
{"ISO-10646", "", CS_UCS2},
|
||||
{"ISO-10646-J-1", "", CS_UCS2},
|
||||
|
||||
/* aliases for UNICODE-1-1-UTF-7: */
|
||||
{"x-UNICODE-2-0-UTF-7", "", CS_UTF7}, /* This is not in INAN */
|
||||
{"UNICODE-1-1-UTF-7", "", CS_UTF7},
|
||||
{"UNICODE-2-0-UTF-7", "", CS_UTF7}, /* Appeared in UTF-7 RFC Draft */
|
||||
{"csUnicode11UTF7", "", CS_UTF7},
|
||||
|
||||
/* aliases for UNICODE-1-1-UTF-8: */
|
||||
{"UNICODE-1-1-UTF-8", "", CS_UTF8},
|
||||
|
||||
{"x-user-defined", "", CS_USER_DEFINED_ENCODING},
|
||||
{"x-user-defined", "", CS_USRDEF2},
|
||||
|
||||
{"RESERVED", "", CS_DEFAULT}, /* or unknown charset */
|
||||
|
||||
/* aliases for VISCII: */
|
||||
{"csVISCII", "", CS_VIET_VISCII},
|
||||
|
||||
/* aliases for VIQR: */
|
||||
{"csVIQR", "", CS_VIET_VIQR},
|
||||
|
||||
/* aliases for ISO-8859-4: */
|
||||
{"ISO_8859-4:1988", "", CS_8859_4},
|
||||
{"iso-ir-110", "", CS_8859_4},
|
||||
{"ISO_8859-4", "", CS_8859_4},
|
||||
{"latin4", "", CS_8859_4},
|
||||
{"l4", "", CS_8859_4},
|
||||
{"csISOLatin4", "", CS_8859_4},
|
||||
|
||||
/* aliases for ISO-8859-9: */
|
||||
{"ISO_8859-9:1989", "", CS_8859_9},
|
||||
{"iso-ir-148", "", CS_8859_9},
|
||||
{"ISO_8859-9", "", CS_8859_9},
|
||||
{"latin5", "", CS_8859_9},
|
||||
{"l5", "", CS_8859_9},
|
||||
{"csISOLatin5", "", CS_8859_9},
|
||||
|
||||
/* aliases for ISO-8859-6: */
|
||||
{"ISO_8859-6:1987", "", CS_8859_6},
|
||||
{"iso-ir-127", "", CS_8859_6},
|
||||
{"ISO_8859-6", "", CS_8859_6},
|
||||
{"ECMA-114", "", CS_8859_6},
|
||||
{"ASMO-708", "", CS_8859_6},
|
||||
{"arabic", "", CS_8859_6},
|
||||
{"csISOLatinArabic", "", CS_8859_6},
|
||||
|
||||
/* aliases for ISO_8859-6-i: */
|
||||
{"csISO88596I", "", CS_8859_6_I},
|
||||
|
||||
/* aliases for ISO_8859-6-e: */
|
||||
{"csISO88596E", "", CS_8859_6_E},
|
||||
|
||||
/* aliases for ISO-8859-8: */
|
||||
{"iso-ir-138", "", CS_8859_8},
|
||||
{"ISO_8859-8", "", CS_8859_8},
|
||||
{"hebrew", "", CS_8859_8},
|
||||
{"csISOLatinHebrew", "", CS_8859_8},
|
||||
|
||||
/* aliases for ISO_8859-8-i: */
|
||||
{"csISO88598I", "", CS_8859_8_I},
|
||||
|
||||
/* aliases for ISO_8859-8-e: */
|
||||
{"csISO88598E", "", CS_8859_8_E},
|
||||
|
||||
/* aliases for ISO-IR-111: */
|
||||
{"ECMA-cyrillic", "", CS_ISO_IR_111},
|
||||
{"csISO111ECMACyrillic", "", CS_ISO_IR_111},
|
||||
|
||||
/* aliases for TIS-620: */
|
||||
{"x-tis-620", "", CS_TIS620},
|
||||
|
||||
/* aliases for T.61-8bit: */
|
||||
{"T.61", "", CS_T61},
|
||||
{"iso-ir-103", "", CS_T61},
|
||||
{"csISO103T618bit", "", CS_T61},
|
||||
|
||||
{"", "", CS_UNKNOWN},
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -1,512 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* csstrlen.c */
|
||||
/*
|
||||
Routines that tell you information about one csid
|
||||
*/
|
||||
#include "intlpriv.h"
|
||||
|
||||
/* csinfoindex and csinfo_tbl work together for performance inprovement.
|
||||
Whenever you add an entry inside csinfo_tbl, you also need to change
|
||||
csinfoindex
|
||||
*/
|
||||
#define MAX_FIRSTBYTE_RANGE 3
|
||||
typedef struct {
|
||||
struct {
|
||||
unsigned char bytes; /* number of bytes for range */
|
||||
unsigned char columns; /* number of columns for range */
|
||||
unsigned char range[2]; /* Multibyte first byte range */
|
||||
} enc[MAX_FIRSTBYTE_RANGE];
|
||||
} csinfo_t;
|
||||
|
||||
PRIVATE csinfo_t csinfo_tbl[] =
|
||||
{
|
||||
/* b = bytes; c = columns */
|
||||
/* b c range 1 b c range 2 b c range 3 */
|
||||
/* 0 */ {{{2,2,{0x81,0x9f}}, {2,2,{0xe0,0xfc}}, {0,0,{0x00,0x00}}}}, /* For SJIS */
|
||||
/* 1 */ {{{2,2,{0xa1,0xfe}}, {2,1,{0x8e,0x8e}}, {3,2,{0x8f,0x8f}}}}, /* For EUC_JP */
|
||||
/* 2 */ {{{2,2,{0xa1,0xfe}}, {0,0,{0x00,0x00}}, {0,0,{0x00,0x00}}}}, /* For BIG5 GB KSC */
|
||||
/* 3 */ {{{2,2,{0xa1,0xfe}}, {4,2,{0x8e,0x8e}}, {0,0,{0x00,0x00}}}}, /* For CNS_8BIT */
|
||||
/* 4 */ {{{2,2,{0x21,0x7e}}, {0,0,{0x00,0x00}}, {0,0,{0x00,0x00}}}}, /* For 2 Byte GL */
|
||||
/* 5 */ {{{2,2,{0xC0,0xDF}}, {3,2,{0xE0,0xEF}}, {0,0,{0x00,0x00}}}}, /* For UTF8 */
|
||||
/* 6 */ {{{2,1,{0xC0,0xCF}}, {0,0,{0x00,0x00}}, {0,0,{0x00,0x00}}}}, /* For UTF8 */
|
||||
/* 0 */ {{{0,0,{0x00,0x00}}, {0,0,{0x00,0x00}}, {0,0,{0x00,0x00}}}}
|
||||
};
|
||||
/* Array to index from the lower 8 bits of csid into the index of csinfo_tbl */
|
||||
PRIVATE int csinfoindex[256] =
|
||||
{/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
|
||||
-1, -1, -1, -1, 0, 1, -1, 2, 2, 3, -1, -1, 2, -1, -1, -1, /* 0x00 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, 4, 4, 4, 4, -1, 4, 4, -1, /* 0x10 */
|
||||
-1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x20 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x30 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x40 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x50 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x60 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x70 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xa0 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb0 */
|
||||
6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc0 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd0 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe0 */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xf0 */
|
||||
};
|
||||
#define INTL_GETTBLINDEX(csid) (csinfoindex[ (csid) & 0x00FF ])
|
||||
|
||||
PRIVATE csinfo_t* intl_GetInfoTbl(int16 csid)
|
||||
{
|
||||
int idx = INTL_GETTBLINDEX(csid);
|
||||
if(idx < 0)
|
||||
return NULL;
|
||||
else
|
||||
return &csinfo_tbl[idx];
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
INTL_MidTruncateString truncate a string removing the
|
||||
middle
|
||||
Input: int16 csid Char Set ID
|
||||
char *input un-truncated string
|
||||
|
||||
Output: char *output pointer to truncated string buffer
|
||||
|
||||
***********************************************************/
|
||||
|
||||
PUBLIC void
|
||||
INTL_MidTruncateString (int16 csid, const char *input, char *output, int max_length)
|
||||
{
|
||||
char *begin_part, *p;
|
||||
int L = strlen (input);
|
||||
char *tmp = 0;
|
||||
int begin_len, mid, rem;
|
||||
|
||||
/*
|
||||
* If it fits then no need to truncate
|
||||
*/
|
||||
if (L <= max_length)
|
||||
{
|
||||
strcpy (output, input);
|
||||
return;
|
||||
}
|
||||
|
||||
if (input == output) /* if copying in place use tmp buf */
|
||||
{
|
||||
tmp = output;
|
||||
output = (char *) calloc (1, max_length + 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* find the 1st half
|
||||
*/
|
||||
mid = (max_length - 3) / 2; /* approx 1st half */
|
||||
/* find 1st half to whole char */
|
||||
for (begin_part=p=(char*)input;
|
||||
*p && p<=((char*)input+mid); p=INTL_NextChar(csid, p))
|
||||
begin_part = p; /* remember last good point before mid */
|
||||
/* exact mid point */
|
||||
begin_len = begin_part - input;
|
||||
|
||||
/*
|
||||
* Copy 1st half
|
||||
*/
|
||||
strncpy (output, input, begin_len);
|
||||
strncpy (output + begin_len, "...", 3);
|
||||
|
||||
/*
|
||||
* find the remainder
|
||||
*/
|
||||
rem = L - mid; /* approx remainder */
|
||||
/* find remainder to whole char */
|
||||
for (p=begin_part; *p && p<((char*)input+rem); p=INTL_NextChar(csid, p))
|
||||
continue;
|
||||
/* exact remainder */
|
||||
rem = p - input;
|
||||
strncpy (output + begin_len + 3, p, L - rem + 1);
|
||||
|
||||
if (tmp)
|
||||
{
|
||||
strncpy (tmp, output, max_length + 1);
|
||||
free (output);
|
||||
}
|
||||
}
|
||||
/***********************************************************
|
||||
Input: int (int16) charsetid Char Set ID
|
||||
char *pstr Buffer which always point to Multibyte char first byte
|
||||
or normal single byte char
|
||||
Output: return next char position
|
||||
***********************************************************/
|
||||
PUBLIC char * INTL_NextChar(int charsetid, char *pstr)
|
||||
{
|
||||
csinfo_t *pInfo ;
|
||||
unsigned char ch ;
|
||||
int i;
|
||||
|
||||
if ((INTL_CharSetType(charsetid) == SINGLEBYTE) || (*pstr == 0)) /* If no csid, assume it's not multibyte */
|
||||
return pstr + 1;
|
||||
|
||||
ch = *pstr ;
|
||||
if((pInfo = intl_GetInfoTbl((int16)charsetid)) != NULL)
|
||||
{
|
||||
for (i=0; i<MAX_FIRSTBYTE_RANGE && pInfo->enc[i].bytes > 0; i++)
|
||||
{
|
||||
if ((ch >= pInfo->enc[i].range[0]) && (ch <= pInfo->enc[i].range[1]))
|
||||
{
|
||||
int j = 0;
|
||||
for (j=0; pstr[j] && j < pInfo->enc[i].bytes; j++)
|
||||
;
|
||||
if (j < pInfo->enc[i].bytes)
|
||||
return pstr+1;
|
||||
else
|
||||
return pstr+j;
|
||||
}
|
||||
}
|
||||
return pstr + 1;
|
||||
}
|
||||
return pstr + 1;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Input: DocumentContext context Window Context
|
||||
unsigned char ch Buffer which always point to Multibyte char
|
||||
first byte or normal single byte char
|
||||
Output: 1, if ch is under ShiftJIS type MultiByte first byte range
|
||||
2, if ch is under EUC type MultiByte first byte range
|
||||
0, if it's not MultiByte firstbyte
|
||||
*********************************************************/
|
||||
|
||||
PUBLIC
|
||||
int PR_CALLBACK
|
||||
INTL_IsLeadByte(int charsetid, unsigned char ch)
|
||||
{
|
||||
csinfo_t *pInfo ;
|
||||
int i;
|
||||
|
||||
if ((INTL_CharSetType(charsetid) == SINGLEBYTE) || (ch == 0)) /* If no csid, assume it's not multibyte */
|
||||
return 0;
|
||||
|
||||
if((pInfo = intl_GetInfoTbl((int16)charsetid)) != NULL)
|
||||
{
|
||||
for (i=0; i<MAX_FIRSTBYTE_RANGE && pInfo->enc[i].bytes > 0; i++)
|
||||
if ((ch >= pInfo->enc[i].range[0]) &&
|
||||
(ch <= pInfo->enc[i].range[1]))
|
||||
return pInfo->enc[i].bytes-1;
|
||||
return 0 ;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
INTL_CharLen(int charsetid, unsigned char *pstr)
|
||||
{
|
||||
int i,l;
|
||||
if ((!pstr) || (!*pstr)) return 0;
|
||||
l = 1 + INTL_IsLeadByte(charsetid, *pstr);
|
||||
for(i=1, pstr++ ; (i<l) && (*pstr); i++, pstr++)
|
||||
;
|
||||
return i;
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
INTL_ColumnWidth(int charsetid, unsigned char *str)
|
||||
{
|
||||
unsigned char b;
|
||||
csinfo_t *pInfo;
|
||||
int i;
|
||||
|
||||
if ((!str) || (!*str))
|
||||
return 0;
|
||||
|
||||
if (INTL_CharSetType(charsetid) == SINGLEBYTE)
|
||||
return 1;
|
||||
if((pInfo = intl_GetInfoTbl((int16)charsetid)) != NULL)
|
||||
{
|
||||
b = *str;
|
||||
for (i = 0; (i < MAX_FIRSTBYTE_RANGE) &&
|
||||
pInfo->enc[i].bytes; i++)
|
||||
{
|
||||
if ((b >= pInfo->enc[i].range[0]) &&
|
||||
(b <= pInfo->enc[i].range[1]))
|
||||
{
|
||||
return pInfo->enc[i].columns;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Input: int (int16) charsetid Char Set ID
|
||||
char *pstr Buffer which always point to Multibyte char
|
||||
first byte or normal single byte char
|
||||
int pos byte position
|
||||
Output: 0, if pos is not on kanji char
|
||||
1, if pos is on kanji 1st byte
|
||||
2, if pos is on kanji 2nd byte
|
||||
3, if pos is on kanji 3rd byte
|
||||
Note: Current this one only works for ShiftJis type multibyte not for JIS or EUC
|
||||
*********************************************************/
|
||||
PUBLIC int
|
||||
INTL_NthByteOfChar(int charsetid, char *pstr, int pos)
|
||||
{
|
||||
int i;
|
||||
int prev;
|
||||
|
||||
pos--;
|
||||
|
||||
if
|
||||
(
|
||||
(INTL_CharSetType(charsetid) == SINGLEBYTE) ||
|
||||
(!pstr) ||
|
||||
(!*pstr) ||
|
||||
(pos < 0)
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
prev = 0;
|
||||
while (pstr[i] && (i <= pos))
|
||||
{
|
||||
prev = i;
|
||||
i += INTL_CharLen(charsetid, (unsigned char *) &pstr[i]);
|
||||
}
|
||||
if (i <= pos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (INTL_CharLen(charsetid, (unsigned char *) &pstr[prev]) < 2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return pos - prev + 1;
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
INTL_IsHalfWidth(uint16 win_csid, unsigned char *pstr)
|
||||
{
|
||||
int c;
|
||||
|
||||
c = *pstr;
|
||||
|
||||
switch (win_csid)
|
||||
{
|
||||
case CS_SJIS:
|
||||
if ((0xa1 <= c) && (c <= 0xdf))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case CS_EUCJP:
|
||||
if (c == 0x8e)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
INTL_NextCharIdxInText
|
||||
Input: csid - window csid
|
||||
text - point to a text buffer
|
||||
pos - origional index position
|
||||
output: index of the position of next character
|
||||
Called by lo_next_character in layfind.c
|
||||
*/
|
||||
PUBLIC int INTL_NextCharIdxInText(int16 csid, unsigned char *text, int pos)
|
||||
{
|
||||
return pos + INTL_CharLen(csid ,text+pos);
|
||||
}
|
||||
/*
|
||||
INTL_PrevCharIdxInText
|
||||
Input: csid - window csid
|
||||
text - point to a text buffer
|
||||
pos - origional index position
|
||||
output: index of the position of previous character
|
||||
Called by lo_next_character in layfind.c
|
||||
*/
|
||||
PUBLIC int INTL_PrevCharIdxInText(int16 csid, unsigned char *text, int pos)
|
||||
{
|
||||
int rev, ff , thislen;
|
||||
if((INTL_CharSetType(csid) == SINGLEBYTE) ) {
|
||||
return pos - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* First, backward to character in ASCII range */
|
||||
for(rev=pos - 1; rev > 0 ; rev--)
|
||||
{
|
||||
if(((text[rev] & 0x80 ) == 0) &&
|
||||
((rev + INTL_CharLen(csid ,text+rev)) < pos))
|
||||
break;
|
||||
}
|
||||
|
||||
/* Then forward till we cross the position. */
|
||||
for(ff = rev ; ff < pos ; ff += thislen)
|
||||
{
|
||||
thislen = INTL_CharLen(csid ,text+ff);
|
||||
if((ff + thislen) >= pos)
|
||||
break;
|
||||
}
|
||||
return ff;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
INTL_NextCharIdx
|
||||
Input: csid - window csid
|
||||
text - point to a text buffer
|
||||
pos - 0 based position
|
||||
output: 0 based next char position
|
||||
Note: this one works for any position no matter it's legal or not
|
||||
*/
|
||||
|
||||
PUBLIC int INTL_NextCharIdx(int16 csid, unsigned char *str, int pos)
|
||||
{
|
||||
int n;
|
||||
unsigned char *p;
|
||||
|
||||
if((INTL_CharSetType(csid) == SINGLEBYTE) || (pos < 0))
|
||||
return pos + 1;
|
||||
|
||||
n = INTL_NthByteOfChar(csid, (char *) str, pos+1);
|
||||
if (n == 0)
|
||||
return pos + 1;
|
||||
|
||||
p = str + pos - n + 1;
|
||||
return pos + INTL_CharLen(csid, p) - n + 1;
|
||||
}
|
||||
/*
|
||||
INTL_PrevCharIdx
|
||||
Input: csid - window csid
|
||||
text - point to a text buffer
|
||||
pos - 0 based position
|
||||
output: 0 based prev char position
|
||||
Note: this one works for any position no matter it's legal or not
|
||||
*/
|
||||
PUBLIC int INTL_PrevCharIdx(int16 csid, unsigned char *str, int pos)
|
||||
{
|
||||
int n;
|
||||
if((INTL_CharSetType(csid) == SINGLEBYTE) || (pos <= 0))
|
||||
return pos - 1;
|
||||
#ifdef DEBUG
|
||||
n = INTL_NthByteOfChar(csid, (char *) str, pos+1);
|
||||
if (n > 1)
|
||||
{
|
||||
XP_TRACE(("Wrong position passed to INTL_PrevCharIdx"));
|
||||
pos -= (n - 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
pos --;
|
||||
if ((n = INTL_NthByteOfChar(csid, (char *) str, pos+1)) > 1)
|
||||
return pos - n + 1;
|
||||
else
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
|
||||
PUBLIC
|
||||
int32 INTL_TextByteCountToCharLen(int16 csid, unsigned char* text, uint32 byteCount)
|
||||
{
|
||||
/* quickly return if it is zero */
|
||||
if(byteCount == 0 )
|
||||
return 0;
|
||||
if(INTL_CharSetType(csid) == SINGLEBYTE)
|
||||
{
|
||||
/* for single byte csid, byteCount equal to charLen */
|
||||
return byteCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
csinfo_t *pInfo ;
|
||||
if((pInfo = intl_GetInfoTbl(csid)) != NULL)
|
||||
{
|
||||
uint32 curByte, curChar;
|
||||
int thislen;
|
||||
for(curByte=curChar=0; curByte < byteCount ;curChar++,curByte += thislen)
|
||||
{
|
||||
int i;
|
||||
unsigned char ch = text[curByte];
|
||||
/* preset thislen to 1 and looking for the entry for this char */
|
||||
for (i=0, thislen = 1; i<MAX_FIRSTBYTE_RANGE && pInfo->enc[i].bytes > 0; i++)
|
||||
{
|
||||
if ((ch >= pInfo->enc[i].range[0]) && (ch <= pInfo->enc[i].range[1]))
|
||||
thislen = pInfo->enc[i].bytes;
|
||||
}
|
||||
}
|
||||
return curChar;
|
||||
}
|
||||
}
|
||||
/* it should not come to here */
|
||||
XP_ASSERT(byteCount);
|
||||
return byteCount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
PUBLIC
|
||||
int32 INTL_TextCharLenToByteCount(int16 csid, unsigned char* text, uint32 charLen)
|
||||
{
|
||||
/* quickly return if it is zero */
|
||||
if(charLen == 0 )
|
||||
return 0;
|
||||
if(INTL_CharSetType(csid) == SINGLEBYTE)
|
||||
{
|
||||
/* for single byte csid, byteCount equal to charLen */
|
||||
return charLen;
|
||||
}
|
||||
else
|
||||
{
|
||||
csinfo_t *pInfo ;
|
||||
if((pInfo = intl_GetInfoTbl(csid)) != NULL)
|
||||
{
|
||||
uint32 curByte, curChar;
|
||||
int thislen;
|
||||
for(curByte=curChar=0; curChar < charLen ;curChar++,curByte += thislen)
|
||||
{
|
||||
int i;
|
||||
unsigned char ch = text[curByte];
|
||||
/* preset thislen to 1 and looking for the entry for this char */
|
||||
for (i=0, thislen = 1; i<MAX_FIRSTBYTE_RANGE && pInfo->enc[i].bytes > 0; i++)
|
||||
{
|
||||
if ((ch >= pInfo->enc[i].range[0]) && (ch <= pInfo->enc[i].range[1]))
|
||||
thislen = pInfo->enc[i].bytes;
|
||||
}
|
||||
}
|
||||
return curByte;
|
||||
}
|
||||
}
|
||||
/* it should not come to here */
|
||||
XP_ASSERT(charLen);
|
||||
return charLen;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,362 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* cvchcode.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
#include "xp.h"
|
||||
#include "libi18n.h"
|
||||
|
||||
|
||||
extern cscvt_t cscvt_tbl[];
|
||||
|
||||
struct RealCCCDataObject {
|
||||
struct INTL_CCCFuncs *funcs_pointer;
|
||||
CCCRADFunc report_autodetect;
|
||||
void *autodetect_closure;
|
||||
CCCFunc cvtfunc;
|
||||
int32 jismode;
|
||||
int32 cvtflag; /* cvt func dependent flag */
|
||||
unsigned char uncvtbuf[UNCVTBUF_SIZE];
|
||||
uint16 default_doc_csid;
|
||||
int16 from_csid;
|
||||
int16 to_csid;
|
||||
int retval; /* error value for return */
|
||||
int32 len; /* byte len of converted buf */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* report_autodetect
|
||||
*/
|
||||
PRIVATE void
|
||||
CallCCCReportAutoDetect(CCCDataObject obj, uint16 detected_doc_csid)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
if (c->report_autodetect)
|
||||
(c->report_autodetect)(c->autodetect_closure, obj, detected_doc_csid);
|
||||
}
|
||||
|
||||
PRIVATE void
|
||||
SetCCCReportAutoDetect(CCCDataObject obj,
|
||||
CCCRADFunc report_autodetect,
|
||||
void *autodetect_closure)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
c->report_autodetect = report_autodetect;
|
||||
c->autodetect_closure = autodetect_closure;
|
||||
}
|
||||
|
||||
/*
|
||||
* cvtfunc
|
||||
*/
|
||||
PRIVATE CCCFunc
|
||||
GetCCCCvtfunc(CCCDataObject obj)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
return c->cvtfunc;
|
||||
}
|
||||
|
||||
PRIVATE void
|
||||
SetCCCCvtfunc(CCCDataObject obj, CCCFunc cvtfunc)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
c->cvtfunc = cvtfunc;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* jismode
|
||||
*/
|
||||
PRIVATE int32
|
||||
GetCCCJismode(CCCDataObject obj)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
return c->jismode;
|
||||
}
|
||||
|
||||
PRIVATE void
|
||||
SetCCCJismode(CCCDataObject obj, int32 jismode)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
c->jismode = jismode;
|
||||
}
|
||||
|
||||
/*
|
||||
* cvtflag
|
||||
*/
|
||||
|
||||
PRIVATE int32
|
||||
GetCCCCvtflag(CCCDataObject obj)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
return c->cvtflag;
|
||||
}
|
||||
|
||||
PRIVATE void
|
||||
SetCCCCvtflag(CCCDataObject obj, int32 cvtflag)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
c->cvtflag = cvtflag;
|
||||
}
|
||||
|
||||
/*
|
||||
* uncvtbuf
|
||||
*/
|
||||
PRIVATE unsigned char*
|
||||
GetCCCUncvtbuf(CCCDataObject obj)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
return c->uncvtbuf;
|
||||
}
|
||||
|
||||
/*
|
||||
* len
|
||||
*/
|
||||
PRIVATE int32
|
||||
GetCCCLen(CCCDataObject obj)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
return c->len;
|
||||
}
|
||||
|
||||
PRIVATE void
|
||||
SetCCCLen(CCCDataObject obj, int32 len)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
c->len = len;
|
||||
}
|
||||
|
||||
/*
|
||||
* retval
|
||||
*/
|
||||
PRIVATE int
|
||||
GetCCCRetval(CCCDataObject obj)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
return c->retval;
|
||||
}
|
||||
|
||||
PRIVATE void
|
||||
SetCCCRetval(CCCDataObject obj, int retval)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
c->retval = retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* default_doc_csid
|
||||
*/
|
||||
PRIVATE void
|
||||
SetCCCDefaultCSID(CCCDataObject obj, uint16 default_doc_csid)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
c->default_doc_csid = default_doc_csid;
|
||||
}
|
||||
|
||||
PRIVATE uint16
|
||||
GetCCCDefaultCSID(CCCDataObject obj)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
return c->default_doc_csid;
|
||||
}
|
||||
|
||||
/*
|
||||
* from_csid
|
||||
*/
|
||||
PRIVATE uint16
|
||||
GetCCCFromCSID(CCCDataObject obj)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
return c->from_csid;
|
||||
}
|
||||
|
||||
PRIVATE void
|
||||
SetCCCFromCSID(CCCDataObject obj, uint16 from_csid)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
c->from_csid = from_csid;
|
||||
}
|
||||
|
||||
/*
|
||||
* to_csid
|
||||
*/
|
||||
PRIVATE uint16
|
||||
GetCCCToCSID(CCCDataObject obj)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
return c->to_csid;
|
||||
}
|
||||
|
||||
PRIVATE void
|
||||
SetCCCToCSID(CCCDataObject obj, uint16 to_csid)
|
||||
{
|
||||
struct RealCCCDataObject *c = (struct RealCCCDataObject *)obj;
|
||||
|
||||
c->to_csid = to_csid;
|
||||
}
|
||||
|
||||
|
||||
PUBLIC unsigned char *
|
||||
INTL_CallCharCodeConverter(CCCDataObject obj, const unsigned char *buf,
|
||||
int32 bufsz)
|
||||
{
|
||||
return (INTL_GetCCCCvtfunc(obj))(obj, buf, bufsz);
|
||||
}
|
||||
|
||||
|
||||
/* INTL_GetCharCodeConverter:
|
||||
* RETURN: 1 if converter found, else 0
|
||||
* Also, sets:
|
||||
* obj->cvtfunc: function handle for chararcter
|
||||
* code set streams converter
|
||||
* obj->cvtflag: (Optional) flag to converter
|
||||
* function
|
||||
* obj->from_csid: Code set converting from
|
||||
* obj->to_csid: Code set converting to
|
||||
* If the arg to_csid==0, then use the the conversion for the
|
||||
* first conversion entry that matches the from_csid.
|
||||
*/
|
||||
PUBLIC int
|
||||
INTL_GetCharCodeConverter( register int16 from_csid,
|
||||
register int16 to_csid,
|
||||
CCCDataObject obj)
|
||||
{
|
||||
register cscvt_t *cscvtp;
|
||||
|
||||
if (from_csid == CS_DEFAULT)
|
||||
INTL_SetCCCFromCSID(obj, INTL_GetCCCDefaultCSID(obj));
|
||||
else
|
||||
INTL_SetCCCFromCSID(obj, from_csid);
|
||||
|
||||
if(to_csid == 0) /* unknown TO codeset */
|
||||
to_csid = INTL_DocToWinCharSetID(from_csid);
|
||||
INTL_SetCCCToCSID(obj, to_csid);
|
||||
|
||||
/* Look-up conversion method given FROM and TO char. code sets */
|
||||
cscvtp = cscvt_tbl;
|
||||
|
||||
while (cscvtp->from_csid) {
|
||||
if ((cscvtp->from_csid == from_csid) && (cscvtp->to_csid == to_csid))
|
||||
break;
|
||||
cscvtp++;
|
||||
}
|
||||
INTL_SetCCCCvtflag(obj, cscvtp->cvtflag);
|
||||
INTL_SetCCCCvtfunc(obj, cscvtp->cvtmethod);
|
||||
|
||||
return (INTL_GetCCCCvtfunc(obj)) ? 1 : 0;
|
||||
}
|
||||
|
||||
/* WARNING: THIS TABLE AND THE STRUCT MUST BE IN SYNC WITH EACH OTHER */
|
||||
PRIVATE struct INTL_CCCFuncs ccc_funcs = {
|
||||
/* set_report_autodetect */ SetCCCReportAutoDetect,
|
||||
/* call_report_autodetect */ CallCCCReportAutoDetect,
|
||||
/* set_cvtfunc */ SetCCCCvtfunc,
|
||||
/* get_cvtfunc */ GetCCCCvtfunc,
|
||||
/* set_jismode */ SetCCCJismode,
|
||||
/* get_jismode */ GetCCCJismode,
|
||||
/* set_cvtflag */ SetCCCCvtflag,
|
||||
/* get_cvtflag */ GetCCCCvtflag,
|
||||
/* get_uncvtbuf */ GetCCCUncvtbuf,
|
||||
/* set_default_doc_csid */ SetCCCDefaultCSID,
|
||||
/* get_default_doc_csid */ GetCCCDefaultCSID,
|
||||
/* set_from_csid */ SetCCCFromCSID,
|
||||
/* get_from_csid */ GetCCCFromCSID,
|
||||
/* set_to_csid */ SetCCCToCSID,
|
||||
/* get_to_csid */ GetCCCToCSID,
|
||||
/* set_retval */ SetCCCRetval,
|
||||
/* get_retval */ GetCCCRetval,
|
||||
/* set_len */ SetCCCLen,
|
||||
/* get_len */ GetCCCLen
|
||||
};
|
||||
|
||||
|
||||
PUBLIC CCCDataObject
|
||||
INTL_CreateCharCodeConverter()
|
||||
{
|
||||
struct RealCCCDataObject *obj;
|
||||
obj = XP_NEW_ZAP(struct RealCCCDataObject);
|
||||
obj->funcs_pointer = &ccc_funcs;
|
||||
obj->default_doc_csid = INTL_DefaultDocCharSetID(0);
|
||||
return (CCCDataObject) obj;
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
INTL_DestroyCharCodeConverter(CCCDataObject obj)
|
||||
{
|
||||
XP_FREE(obj);
|
||||
}
|
||||
|
||||
PRIVATE unsigned char *intl_conv (int16 fromcsid, int16 tocsid, unsigned char *pSrc, uint32 block_size);
|
||||
PRIVATE
|
||||
unsigned char *intl_conv(int16 fromcsid, int16 tocsid, unsigned char *pSrc, uint32 block_size)
|
||||
{
|
||||
CCCDataObject obj;
|
||||
unsigned char *pDest = NULL;
|
||||
if (NULL != (obj = INTL_CreateCharCodeConverter()))
|
||||
{
|
||||
if(0 != INTL_GetCharCodeConverter(fromcsid, tocsid, obj))
|
||||
{
|
||||
CCCFunc cvtfunc;
|
||||
if (NULL != (cvtfunc = INTL_GetCCCCvtfunc(obj)))
|
||||
{
|
||||
if(pSrc == (pDest = (unsigned char *)cvtfunc(obj, pSrc, block_size)) )
|
||||
{
|
||||
/* if it use the same buffer to do conversion, we return NULL */
|
||||
pDest = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
INTL_DestroyCharCodeConverter(obj);
|
||||
}
|
||||
return pDest ;
|
||||
}
|
||||
|
||||
PUBLIC unsigned char *
|
||||
INTL_ConvertLineWithoutAutoDetect (int16 fromcsid, int16 tocsid, unsigned char *pSrc, uint32 block_size)
|
||||
{
|
||||
#ifdef XP_OS2
|
||||
if (fromcsid != tocsid)
|
||||
{
|
||||
return intl_conv(fromcsid, tocsid, pSrc, block_size);
|
||||
else
|
||||
{
|
||||
return XP_STRDUP(pSrc);
|
||||
}
|
||||
#else
|
||||
return intl_conv(fromcsid, tocsid, pSrc, block_size);
|
||||
#endif /* XP_OS2 */
|
||||
}
|
||||
|
||||
|
||||
@ -1,117 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
|
||||
/* datetime.c */
|
||||
|
||||
|
||||
|
||||
|
||||
#include "libi18n.h"
|
||||
#include "xp.h"
|
||||
|
||||
/**
|
||||
* Locale sensitive Date formmating function
|
||||
*
|
||||
* Using a given selector, this returns a charset ID.
|
||||
* Designed to retrieve a non-context dependent charset ID (e.g file system).
|
||||
*
|
||||
* @param localeID Specification for the Locale conventions to use.
|
||||
* @param formatSelector Specification for the type of format to select
|
||||
* @param time time
|
||||
* @param utf8Buffer result buffer (in utf8)
|
||||
* @param bufferLength length of result buffer
|
||||
* @return PRSuccess when succesful, PRFailure otherwise
|
||||
*/
|
||||
PUBLIC PRStatus INTL_FormatTime(INTLLocaleID localeID,
|
||||
INTL_DateFormatSelector dateFormatSelector,
|
||||
INTL_TimeFormatSelector timeFormatSelector,
|
||||
time_t time,
|
||||
unsigned char* utf8Buffer,
|
||||
PRUint32 bufferLength)
|
||||
{
|
||||
struct tm* tm_time;
|
||||
|
||||
tm_time = localtime(&time);
|
||||
|
||||
return INTL_FormatTMTime(localeID,dateFormatSelector,timeFormatSelector,tm_time,utf8Buffer,bufferLength);
|
||||
|
||||
}
|
||||
|
||||
PUBLIC PRStatus INTL_FormatTMTime(INTLLocaleID localeID,
|
||||
INTL_DateFormatSelector dateFormatSelector,
|
||||
INTL_TimeFormatSelector timeFormatSelector,
|
||||
const struct tm* time,
|
||||
unsigned char* utf8Buffer,
|
||||
PRUint32 bufferLength)
|
||||
{
|
||||
LCID windowsLCID = GetThreadLocale();
|
||||
DWORD windowsDateFlags, windowsTimeFlags;
|
||||
SYSTEMTIME sysTime;
|
||||
int resultLength;
|
||||
|
||||
/* convert to windows SYSTIME structure */
|
||||
sysTime.wYear = (time->tm_year)+1900; /* offset from 1900 */
|
||||
sysTime.wMonth = time->tm_mon;
|
||||
sysTime.wDayOfWeek = time->tm_wday;
|
||||
sysTime.wDay = time->tm_mday;
|
||||
sysTime.wHour = time->tm_hour;
|
||||
sysTime.wMinute = time->tm_min;
|
||||
sysTime.wSecond = time->tm_sec;
|
||||
sysTime.wMilliseconds = 0;
|
||||
|
||||
|
||||
if (dateFormatSelector!=INTL_DateFormatNone)
|
||||
{
|
||||
switch(dateFormatSelector)
|
||||
{
|
||||
|
||||
case INTL_DateFormatLong: windowsDateFlags = DATE_LONGDATE;
|
||||
break;
|
||||
case INTL_DateFormatShort: windowsDateFlags = DATE_SHORTDATE;
|
||||
break;
|
||||
default:
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
||||
resultLength = GetDateFormat(windowsLCID,windowsDateFlags,&sysTime,NULL,utf8Buffer,bufferLength);
|
||||
}
|
||||
|
||||
if (timeFormatSelector!=INTL_TimeFormatNone)
|
||||
{
|
||||
switch(timeFormatSelector)
|
||||
{
|
||||
case INTL_TimeFormatSeconds: windowsTimeFlags = 0; /* no flags */
|
||||
break;
|
||||
case INTL_TimeFormatNoSeconds: windowsTimeFlags = TIME_NOSECONDS;
|
||||
break;
|
||||
case INTL_TimeFormatForce24Hour: windowsTimeFlags = TIME_FORCE24HOURFORMAT;
|
||||
break;
|
||||
default:
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
||||
if (dateFormatSelector!=INTL_DateFormatNone)
|
||||
{
|
||||
utf8Buffer[resultLength-1]=0x20; /* space character */
|
||||
}
|
||||
GetTimeFormat(windowsLCID,windowsTimeFlags,&sysTime,NULL,utf8Buffer+resultLength,bufferLength-resultLength);
|
||||
}
|
||||
|
||||
return PR_SUCCESS;
|
||||
}
|
||||
@ -1,343 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* dblower.c */
|
||||
/*
|
||||
This function contain the doublebyte to lower table which need to implement function in
|
||||
intlcomp.c.
|
||||
None of the function in this file should be made public
|
||||
The interface function is INTL_GetDoubleByteToLowerMap() and it should only be called
|
||||
inside libi18n
|
||||
*/
|
||||
#include "intlpriv.h"
|
||||
#include "pintlcmp.h"
|
||||
|
||||
PRIVATE DoubleByteToLowerMap lower_lookup_none[]=
|
||||
{
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00 } /* Terminator */
|
||||
};
|
||||
|
||||
#ifndef XP_UNIX
|
||||
PRIVATE DoubleByteToLowerMap lower_lookup_sjis[]=
|
||||
{
|
||||
/* Full-width Latin */
|
||||
{ 0x82, 0x60, 0x7a, 0x82, 0x81 },
|
||||
|
||||
/* Map Full-width Hiragana to Full-width Katakana */
|
||||
{ 0x82, 0x9f, 0x9f, 0x83, 0x41 }, /* A */
|
||||
{ 0x82, 0xa0, 0xa0, 0x83, 0x41 },
|
||||
|
||||
{ 0x82, 0xa1, 0xa1, 0x83, 0x43 }, /* I */
|
||||
{ 0x82, 0xa2, 0xa2, 0x83, 0x43 },
|
||||
|
||||
{ 0x82, 0xa3, 0xa3, 0x83, 0x45 }, /* U */
|
||||
{ 0x82, 0xa4, 0xa4, 0x83, 0x45 },
|
||||
|
||||
{ 0x82, 0xa5, 0xa5, 0x83, 0x47 }, /* E */
|
||||
{ 0x82, 0xa6, 0xa6, 0x83, 0x47 },
|
||||
|
||||
{ 0x82, 0xa7, 0xa7, 0x83, 0x49 }, /* O */
|
||||
{ 0x82, 0xa8, 0xa8, 0x83, 0x49 },
|
||||
|
||||
{ 0x82, 0xa9, 0xc0, 0x83, 0x4a }, /* KA - DI */
|
||||
|
||||
{ 0x82, 0xc1, 0xc1, 0x83, 0x63 }, /* TU */
|
||||
{ 0x82, 0xc2, 0xc2, 0x83, 0x63 },
|
||||
|
||||
{ 0x82, 0xc3, 0xdd, 0x83, 0x64 }, /* DU - MI */
|
||||
{ 0x82, 0xde, 0xe0, 0x83, 0x80 }, /* MU - MO */
|
||||
|
||||
{ 0x82, 0xe1, 0xe1, 0x83, 0x84 }, /* YA */
|
||||
{ 0x82, 0xe2, 0xe2, 0x83, 0x84 },
|
||||
|
||||
{ 0x82, 0xe3, 0xe3, 0x83, 0x86 }, /* YU */
|
||||
{ 0x82, 0xe4, 0xe4, 0x83, 0x86 },
|
||||
|
||||
{ 0x82, 0xe5, 0xe5, 0x83, 0x88 }, /* YO */
|
||||
{ 0x82, 0xe6, 0xe6, 0x83, 0x88 },
|
||||
|
||||
{ 0x82, 0xe7, 0xeb, 0x83, 0x89 }, /* RA - RO */
|
||||
|
||||
{ 0x82, 0xec, 0xec, 0x83, 0x8f }, /* WA */
|
||||
{ 0x82, 0xed, 0xed, 0x83, 0x8f },
|
||||
|
||||
{ 0x82, 0xee, 0xf1, 0x83, 0x90 }, /* WI - N */
|
||||
|
||||
/* Map SMALL Full-width Katakana to Full-width Katakana */
|
||||
{ 0x83, 0x40, 0x40, 0x83, 0x41 }, /* A */
|
||||
{ 0x83, 0x42, 0x42, 0x83, 0x43 }, /* I */
|
||||
{ 0x83, 0x43, 0x44, 0x83, 0x45 }, /* U */
|
||||
{ 0x83, 0x46, 0x46, 0x83, 0x47 }, /* E */
|
||||
{ 0x83, 0x48, 0x47, 0x83, 0x49 }, /* O */
|
||||
{ 0x83, 0x62, 0x62, 0x83, 0x63 }, /* TU */
|
||||
{ 0x83, 0x83, 0x83, 0x83, 0x84 }, /* YA */
|
||||
{ 0x83, 0x85, 0x85, 0x83, 0x86 }, /* YU */
|
||||
{ 0x83, 0x87, 0x87, 0x83, 0x88 }, /* YO */
|
||||
{ 0x83, 0x8e, 0x8e, 0x83, 0x8f }, /* WA */
|
||||
|
||||
/* Full-width Greek */
|
||||
{ 0x83, 0x9f, 0xb6, 0x83, 0xbf },
|
||||
|
||||
/* Full-width Cyrillic*/
|
||||
{ 0x84, 0x40, 0x4e, 0x84, 0x70 }, /* Part 1 */
|
||||
{ 0x84, 0x4f, 0x61, 0x84, 0x80 }, /* Part 2 */
|
||||
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00 } /* Terminator */
|
||||
};
|
||||
#endif
|
||||
/* Don't #ifdef XP_UNIX for lower_lookup_eucjp. It is also used by GB2312 */
|
||||
PRIVATE DoubleByteToLowerMap lower_lookup_eucjp[]=
|
||||
{
|
||||
/* Half-width Katakana */
|
||||
{ SS2, 0xa6, 0xa6, 0xa5, 0xf2 }, /* WO */
|
||||
|
||||
{ SS2, 0xa7, 0xa7, 0xa5, 0xa2 }, /* A */
|
||||
{ SS2, 0xa8, 0xa8, 0xa5, 0xa4 }, /* I */
|
||||
{ SS2, 0xa9, 0xa9, 0xa5, 0xa6 }, /* U */
|
||||
{ SS2, 0xaa, 0xaa, 0xa5, 0xa8 }, /* E */
|
||||
{ SS2, 0xab, 0xab, 0xa5, 0xaa }, /* O */
|
||||
|
||||
{ SS2, 0xac, 0xac, 0xa5, 0xe4 }, /* YA */
|
||||
{ SS2, 0xad, 0xad, 0xa5, 0xe6 }, /* YU */
|
||||
{ SS2, 0xae, 0xae, 0xa5, 0xe8 }, /* YO */
|
||||
{ SS2, 0xaf, 0xaf, 0xa5, 0xc4 }, /* TU */
|
||||
|
||||
{ SS2, 0xb1, 0xb1, 0xa5, 0xa2 }, /* A */
|
||||
{ SS2, 0xb2, 0xb2, 0xa5, 0xa4 }, /* I */
|
||||
{ SS2, 0xb3, 0xb3, 0xa5, 0xa6 }, /* U */
|
||||
{ SS2, 0xb4, 0xb4, 0xa5, 0xa8 }, /* E */
|
||||
{ SS2, 0xb5, 0xb5, 0xa5, 0xaa }, /* O */
|
||||
|
||||
{ SS2, 0xb6, 0xb6, 0xa5, 0xab }, /* KA */
|
||||
{ SS2, 0xb7, 0xb7, 0xa5, 0xad }, /* KI */
|
||||
{ SS2, 0xb8, 0xb8, 0xa5, 0xaf }, /* KU */
|
||||
{ SS2, 0xb9, 0xb9, 0xa5, 0xb1 }, /* KE */
|
||||
{ SS2, 0xba, 0xba, 0xa5, 0xb3 }, /* KO */
|
||||
|
||||
{ SS2, 0xbb, 0xbb, 0xa5, 0xb5 }, /* SA */
|
||||
{ SS2, 0xbc, 0xbc, 0xa5, 0xb7 }, /* SI */
|
||||
{ SS2, 0xbd, 0xbd, 0xa5, 0xb9 }, /* SU */
|
||||
{ SS2, 0xbe, 0xbe, 0xa5, 0xbb }, /* SE */
|
||||
{ SS2, 0xbf, 0xbf, 0xa5, 0xbd }, /* SO */
|
||||
|
||||
{ SS2, 0xc0, 0xc0, 0xa5, 0xbf }, /* TA */
|
||||
{ SS2, 0xc1, 0xc1, 0xa5, 0xc1 }, /* TI */
|
||||
{ SS2, 0xc2, 0xc2, 0xa5, 0xc4 }, /* TU */
|
||||
{ SS2, 0xc3, 0xc3, 0xa5, 0xc6 }, /* TE */
|
||||
{ SS2, 0xc4, 0xc4, 0xa5, 0xc8 }, /* TO */
|
||||
|
||||
{ SS2, 0xc5, 0xc9, 0xa5, 0xca }, /* NA - NO */
|
||||
|
||||
{ SS2, 0xca, 0xca, 0xa5, 0xcf }, /* HA */
|
||||
{ SS2, 0xcb, 0xcb, 0xa5, 0xd2 }, /* HI */
|
||||
{ SS2, 0xcc, 0xcc, 0xa5, 0xd5 }, /* HU */
|
||||
{ SS2, 0xcd, 0xcd, 0xa5, 0xd8 }, /* HE */
|
||||
{ SS2, 0xce, 0xce, 0xa5, 0xdb }, /* HO */
|
||||
|
||||
{ SS2, 0xcf, 0xd3, 0xa5, 0xde }, /* MA - MO */
|
||||
|
||||
{ SS2, 0xd4, 0xd4, 0xa5, 0xe4 }, /* YA */
|
||||
{ SS2, 0xd5, 0xd5, 0xa5, 0xe6 }, /* YU */
|
||||
{ SS2, 0xd6, 0xd6, 0xa5, 0xe8 }, /* YO */
|
||||
|
||||
{ SS2, 0xd7, 0xdb, 0xa5, 0xe9 }, /* RA - RO */
|
||||
|
||||
{ SS2, 0xdc, 0xdc, 0xa5, 0xef }, /* WA */
|
||||
|
||||
{ SS2, 0xdd, 0xdd, 0xa5, 0xf3 }, /* N */
|
||||
|
||||
/* Full-width Latin */
|
||||
{ 0xa3, 0xc1, 0xda, 0xa3, 0xe1 },
|
||||
|
||||
/* Map Full-width Hiragana to Full-width Katakana */
|
||||
{ 0xa4, 0xa1, 0xa1, 0xa5, 0xa2 }, /* A */
|
||||
{ 0xa4, 0xa2, 0xa2, 0xa5, 0xa2 },
|
||||
|
||||
{ 0xa4, 0xa3, 0xa3, 0xa5, 0xa4 }, /* I */
|
||||
{ 0xa4, 0xa4, 0xa4, 0xa5, 0xa4 },
|
||||
|
||||
{ 0xa4, 0xa5, 0xa5, 0xa5, 0xa6 }, /* U */
|
||||
{ 0xa4, 0xa6, 0xa6, 0xa5, 0xa6 },
|
||||
|
||||
{ 0xa4, 0xa7, 0xa7, 0xa5, 0xa8 }, /* E */
|
||||
{ 0xa4, 0xa8, 0xa8, 0xa5, 0xa8 },
|
||||
|
||||
{ 0xa4, 0xa9, 0xa9, 0xa5, 0xaa }, /* O */
|
||||
{ 0xa4, 0xaa, 0xaa, 0xa5, 0xaa },
|
||||
|
||||
{ 0xa4, 0xab, 0xc2, 0xa5, 0xab}, /* KA - DI */
|
||||
|
||||
{ 0xa4, 0xc3, 0xc3, 0xa5, 0xc4 }, /* TU */
|
||||
{ 0xa4, 0xc4, 0xc4, 0xa5, 0xc4 },
|
||||
|
||||
{ 0xa4, 0xc5, 0xe2, 0xa5, 0xc5 }, /* DU - MO */
|
||||
|
||||
{ 0xa4, 0xe3, 0xe3, 0xa5, 0xe4 }, /* YA */
|
||||
{ 0xa4, 0xe4, 0xe4, 0xa5, 0xe4 },
|
||||
|
||||
{ 0xa4, 0xe5, 0xe5, 0xa5, 0xe6 }, /* YU */
|
||||
{ 0xa4, 0xe6, 0xe6, 0xa5, 0xe6 },
|
||||
|
||||
{ 0xa4, 0xe7, 0xe7, 0xa5, 0xe8 }, /* YO */
|
||||
{ 0xa4, 0xe8, 0xe8, 0xa5, 0xe8 },
|
||||
|
||||
{ 0xa4, 0xe9, 0xed, 0xa5, 0xe9}, /* RA - RO */
|
||||
|
||||
{ 0xa4, 0xee, 0xee, 0xa5, 0xef }, /* WA */
|
||||
{ 0xa4, 0xef, 0xef, 0xa5, 0xef },
|
||||
|
||||
{ 0xa4, 0xf0, 0xf3, 0xa5, 0xf0 }, /* WI - N */
|
||||
|
||||
/* Map SMALL Full-width Katakana to Full-width Katakana */
|
||||
{ 0xa5, 0xa1, 0xa1, 0xa5, 0xa2 }, /* A */
|
||||
{ 0xa5, 0xa3, 0xa3, 0xa5, 0xa4 }, /* I */
|
||||
{ 0xa5, 0xa5, 0xa5, 0xa5, 0xa6 }, /* U */
|
||||
{ 0xa5, 0xa7, 0xa7, 0xa5, 0xa8 }, /* E */
|
||||
{ 0xa5, 0xa9, 0xa9, 0xa5, 0xaa }, /* O */
|
||||
{ 0xa5, 0xc3, 0xc3, 0xa5, 0xc4 }, /* TU */
|
||||
{ 0xa5, 0xe3, 0xe3, 0xa5, 0xe4 }, /* YA */
|
||||
{ 0xa5, 0xe5, 0xe5, 0xa5, 0xe6 }, /* YU */
|
||||
{ 0xa5, 0xe7, 0xe7, 0xa5, 0xe8 }, /* YO */
|
||||
{ 0xa5, 0xee, 0xee, 0xa5, 0xef }, /* WA */
|
||||
|
||||
/* Full-width Greek */
|
||||
{ 0xa6, 0xa1, 0xb8, 0xa6, 0xc1 },
|
||||
/* Full-width Cyrillic*/
|
||||
{ 0xa7, 0xa1, 0xc1, 0xa7, 0xd1 },
|
||||
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00 } /* Terminator */
|
||||
};
|
||||
PRIVATE DoubleByteToLowerMap lower_lookup_big5[]=
|
||||
{
|
||||
/* Full-width Latin */
|
||||
{ 0xa2, 0xcf, 0xe4, 0xa2, 0xe9 }, /* Part 1 A-V */
|
||||
{ 0xa2, 0xe5, 0xe8, 0xa3, 0x40 }, /* Part 2 W-Z */
|
||||
|
||||
/* Full-width Greek */
|
||||
{ 0xa3, 0x44, 0x5b, 0xa3, 0x5c },
|
||||
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00 } /* Terminator */
|
||||
};
|
||||
PRIVATE DoubleByteToLowerMap lower_lookup_cns11643_1[]=
|
||||
{
|
||||
/* Roman Number */
|
||||
{ 0xa4, 0xab, 0xb4, 0xa6, 0xb5 },
|
||||
|
||||
/* Full-width Latin */
|
||||
{ 0xa4, 0xc1, 0xda, 0xa4, 0xdb },
|
||||
|
||||
/* Full-width Greek */
|
||||
{ 0xa4, 0xf5, 0xfe, 0xa5, 0xaf }, /* Part 1 Alpha - kappa */
|
||||
{ 0xa5, 0xa1, 0xae, 0xa5, 0xb9 }, /* Part 2 Lamda - Omega */
|
||||
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00 } /* Terminator */
|
||||
};
|
||||
PRIVATE DoubleByteToLowerMap lower_lookup_ksc5601[]=
|
||||
{
|
||||
/* Full-width Latin */
|
||||
{ 0xa3, 0xc1, 0xda, 0xa3, 0xe1 },
|
||||
|
||||
/* Full-width Roman Number */
|
||||
{ 0xa5, 0xb0, 0xb9, 0xa5, 0xa1 },
|
||||
|
||||
/* Full-width Greek */
|
||||
{ 0xa5, 0xc1, 0xd8, 0xa5, 0xe1 },
|
||||
|
||||
/* Map Full-width Hiragana to Full-width Katakana */
|
||||
{ 0xaa, 0xa1, 0xa1, 0xab, 0xa2 }, /* A */
|
||||
{ 0xaa, 0xa2, 0xa2, 0xab, 0xa2 },
|
||||
|
||||
{ 0xaa, 0xa3, 0xa3, 0xab, 0xa4 }, /* I */
|
||||
{ 0xaa, 0xa4, 0xa4, 0xab, 0xa4 },
|
||||
|
||||
{ 0xaa, 0xa5, 0xa5, 0xab, 0xa6 }, /* U */
|
||||
{ 0xaa, 0xa6, 0xa6, 0xab, 0xa6 },
|
||||
|
||||
{ 0xaa, 0xa7, 0xa7, 0xab, 0xa8 }, /* E */
|
||||
{ 0xaa, 0xa8, 0xa8, 0xab, 0xa8 },
|
||||
|
||||
{ 0xaa, 0xa9, 0xa9, 0xab, 0xaa }, /* O */
|
||||
{ 0xaa, 0xaa, 0xaa, 0xab, 0xaa },
|
||||
|
||||
{ 0xaa, 0xab, 0xc2, 0xab, 0xab}, /* KA - DI */
|
||||
|
||||
{ 0xaa, 0xc3, 0xc3, 0xab, 0xc4 }, /* TU */
|
||||
{ 0xaa, 0xc4, 0xc4, 0xab, 0xc4 },
|
||||
|
||||
{ 0xaa, 0xc5, 0xe2, 0xab, 0xc5 }, /* DU - MO */
|
||||
|
||||
{ 0xaa, 0xe3, 0xe3, 0xab, 0xe4 }, /* YA */
|
||||
{ 0xaa, 0xe4, 0xe4, 0xab, 0xe4 },
|
||||
|
||||
{ 0xaa, 0xe5, 0xe5, 0xab, 0xe6 }, /* YU */
|
||||
{ 0xaa, 0xe6, 0xe6, 0xab, 0xe6 },
|
||||
|
||||
{ 0xaa, 0xe7, 0xe7, 0xab, 0xe8 }, /* YO */
|
||||
{ 0xaa, 0xe8, 0xe8, 0xab, 0xe8 },
|
||||
|
||||
{ 0xaa, 0xe9, 0xed, 0xab, 0xe9}, /* RA - RO */
|
||||
|
||||
{ 0xaa, 0xee, 0xee, 0xab, 0xef }, /* WA */
|
||||
{ 0xaa, 0xef, 0xef, 0xab, 0xef },
|
||||
|
||||
{ 0xaa, 0xf0, 0xf3, 0xab, 0xf0 }, /* WI - N */
|
||||
|
||||
/* Map SMALL Full-width Katakana to Full-width Katakana */
|
||||
{ 0xab, 0xa1, 0xa1, 0xab, 0xa2 }, /* A */
|
||||
{ 0xab, 0xa3, 0xa3, 0xab, 0xa4 }, /* I */
|
||||
{ 0xab, 0xa5, 0xa5, 0xab, 0xa6 }, /* U */
|
||||
{ 0xab, 0xa7, 0xa7, 0xab, 0xa8 }, /* E */
|
||||
{ 0xab, 0xa9, 0xa9, 0xab, 0xaa }, /* O */
|
||||
{ 0xab, 0xc3, 0xc3, 0xab, 0xc4 }, /* TU */
|
||||
{ 0xab, 0xe3, 0xe3, 0xab, 0xe4 }, /* YA */
|
||||
{ 0xab, 0xe5, 0xe5, 0xab, 0xe6 }, /* YU */
|
||||
{ 0xab, 0xe7, 0xe7, 0xab, 0xe8 }, /* YO */
|
||||
{ 0xab, 0xee, 0xee, 0xab, 0xef }, /* WA */
|
||||
|
||||
/* Full-width Cyrillic*/
|
||||
{ 0xac, 0xa1, 0xc1, 0xac, 0xd1 },
|
||||
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00 } /* Terminator */
|
||||
};
|
||||
|
||||
MODULE_PRIVATE DoubleByteToLowerMap *INTL_GetDoubleByteToLowerMap(int16 csid)
|
||||
{
|
||||
switch(csid)
|
||||
{
|
||||
#ifndef XP_UNIX
|
||||
case CS_SJIS:
|
||||
return lower_lookup_sjis;
|
||||
#else
|
||||
case CS_EUCJP:
|
||||
return lower_lookup_eucjp;
|
||||
#endif
|
||||
case CS_BIG5:
|
||||
return lower_lookup_big5;
|
||||
case CS_CNS_8BIT:
|
||||
return lower_lookup_cns11643_1;
|
||||
case CS_GB_8BIT:
|
||||
return lower_lookup_eucjp; /* The to_lower mapping for GB 2312 and JIS0208 are exactly the same */
|
||||
/* We just use the same table here. */
|
||||
case CS_KSC_8BIT:
|
||||
return lower_lookup_ksc5601;
|
||||
default:
|
||||
return lower_lookup_none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,49 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* detectu2.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
#include "xp.h"
|
||||
#include "libi18n.h"
|
||||
|
||||
|
||||
/*
|
||||
This function returns csid if it finds that the data is UCS-2 or
|
||||
UCS-2 needs swap.
|
||||
*/
|
||||
#define UCS2_GIVEUP_COUNT 512 /* Test at most 512 byte */
|
||||
#define UCS2_00_TRIGGER 8 /* Need at least 4 0x00 to make our sample meanful */
|
||||
#define UCS2_DETECT_DIFF 4
|
||||
|
||||
MODULE_PRIVATE int DetectUCS2(CCCDataObject obj, unsigned char *pSrc, int len)
|
||||
{
|
||||
/* need to fix DetectUCS2 to look for UTF8 */
|
||||
if(len < 2) return(CS_DEFAULT);
|
||||
|
||||
if(((pSrc[0]<<8) | pSrc[1]) == BYTE_ORDER_MARK)
|
||||
return(CS_UCS2);
|
||||
|
||||
if(((pSrc[0]<<8) | pSrc[1]) == NEEDS_SWAP_MARK)
|
||||
return(CS_UCS2_SWAP);
|
||||
return(CS_DEFAULT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,411 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* cvchcode.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
#include "xp.h"
|
||||
#include "intl_csi.h"
|
||||
#include "libi18n.h"
|
||||
#include "katakana.h"
|
||||
|
||||
int16 PeekMetaCharsetTag (char *, uint32);
|
||||
|
||||
/*
|
||||
* DocumentContext access to creating a
|
||||
* Character Code Converter
|
||||
*
|
||||
* This should be split into two layers:
|
||||
* 1) a non-DocumentContext access to creating a Character Code Converter
|
||||
* 2) a DocumentContext interface to above
|
||||
*/
|
||||
PUBLIC CCCDataObject
|
||||
INTL_CreateDocumentCCC(INTL_CharSetInfo c, uint16 default_doc_csid)
|
||||
{
|
||||
CCCDataObject obj;
|
||||
|
||||
/*
|
||||
* create the CCC object
|
||||
*/
|
||||
obj = INTL_CreateCharCodeConverter();;
|
||||
if (obj == NULL)
|
||||
return(NULL);
|
||||
INTL_SetCCCDefaultCSID(obj, default_doc_csid);
|
||||
|
||||
/*
|
||||
* if we know the doc_csid then get the converter
|
||||
*/
|
||||
if (DOC_CSID_KNOWN(INTL_GetCSIDocCSID(c)))
|
||||
{
|
||||
(void) INTL_GetCharCodeConverter(INTL_GetCSIDocCSID(c), 0, obj);
|
||||
XP_ASSERT(INTL_GetCSIWinCSID(c) == INTL_GetCCCToCSID(obj));
|
||||
}
|
||||
else {
|
||||
/* we know what the default converter is but do not install
|
||||
* it yet. Wait until the first block and see if we determine
|
||||
* what the charset is from that block.
|
||||
*/
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
PUBLIC void INTL_CCCReportMetaCharsetTag(MWContext *context, char *charset_tag)
|
||||
{
|
||||
|
||||
INTL_CharSetInfo c = LO_GetDocumentCharacterSetInfo(context);
|
||||
|
||||
INTL_CSIReportMetaCharsetTag(c, charset_tag, context->type);
|
||||
}
|
||||
|
||||
#ifdef MOZ_MAIL_NEWS
|
||||
|
||||
#if 0
|
||||
/*
|
||||
INTL_ConvWinToMailCharCode
|
||||
Converts 8bit encoding to 7bit mail encoding. It decides which 7bit and 8bit encoding
|
||||
to use based on current default language.
|
||||
input:
|
||||
char *pSrc; // Source display buffer
|
||||
output:
|
||||
char *pDest; // Destination buffer
|
||||
// pDest == NULL means either conversion fail
|
||||
// or does OneToOne conversion
|
||||
*/
|
||||
PUBLIC
|
||||
unsigned char *INTL_ConvWinToMailCharCode(iDocumentContext context, unsigned char *pSrc, uint32 block_size)
|
||||
{
|
||||
CCCDataObject obj;
|
||||
unsigned char *pDest;
|
||||
int16 wincsid;
|
||||
CCCFunc cvtfunc;
|
||||
|
||||
obj = INTL_CreateCharCodeConverter();
|
||||
if (obj == NULL)
|
||||
return NULL;
|
||||
|
||||
wincsid = INTL_DefaultWinCharSetID(context);
|
||||
/* Converts 8bit Window codeset to 7bit Mail Codeset. */
|
||||
(void) INTL_GetCharCodeConverter(wincsid, INTL_DefaultMailCharSetID(wincsid), obj);
|
||||
|
||||
cvtfunc = INTL_GetCCCCvtfunc(obj);
|
||||
if (cvtfunc)
|
||||
pDest = (unsigned char *)cvtfunc(obj, pSrc, block_size);
|
||||
else
|
||||
pDest = NULL ;
|
||||
|
||||
XP_FREE(obj);
|
||||
|
||||
if (pDest == pSrc) /* converted to input buffer */
|
||||
{ /* no additional memory been allocated */
|
||||
return NULL;
|
||||
}
|
||||
return pDest ;
|
||||
}
|
||||
|
||||
|
||||
#endif /* if 0 */
|
||||
|
||||
|
||||
PRIVATE void
|
||||
mail_report_autodetect(void *closure, CCCDataObject obj, uint16 doc_csid)
|
||||
{
|
||||
iDocumentContext doc_context = (iDocumentContext)closure;
|
||||
INTL_CharSetInfo c = LO_GetDocumentCharacterSetInfo(doc_context);
|
||||
|
||||
INTL_SetCSIDocCSID(c, doc_csid);
|
||||
INTL_SetCSIWinCSID(c, INTL_GetCCCToCSID(obj));
|
||||
}
|
||||
|
||||
#endif /* MOZ_MAIL_NEWS */
|
||||
|
||||
#ifndef XP_WIN
|
||||
#ifndef XP_MAC
|
||||
/*
|
||||
* FE_DefaultDocCharSetID - get the UI charset encoding setting
|
||||
*
|
||||
* gets the currently selected charset encoding for this document
|
||||
* (not the global default, not the detected document encoding)
|
||||
*
|
||||
*/
|
||||
uint16
|
||||
FE_DefaultDocCharSetID(iDocumentContext context)
|
||||
{
|
||||
uint16 csid;
|
||||
|
||||
/* need to implement a FE_DefaultDocCharSetID() which only returns
|
||||
the FE default, ignoring the doc_csid in the the context.
|
||||
The Current INTL_DefaultDocCharSetID
|
||||
tries to be smart and return the doc_csid if it is known,
|
||||
which causes a problem in HERE !!
|
||||
*/
|
||||
#ifdef REAL_FIX_AFTER_B3
|
||||
/* ftang, bstell: Need to change to this code in early 4.0 B4 cycle */
|
||||
csid = FE_DefaultDocCharSetID(context); /* Need to implement FE_DefaultDocCharSetID before active this */
|
||||
|
||||
if((CS_JIS == csid) || (CS_EUCJP == csid) || (CS_SJIS == csid) ||
|
||||
(CS_KSC_8BIT == csid) || (CS_2022_KR == csid))
|
||||
{
|
||||
csid |= CS_AUTO;
|
||||
}
|
||||
#else /* 4.0 B3 temp fix */
|
||||
INTL_CharSetInfo c = LO_GetDocumentCharacterSetInfo(context);
|
||||
|
||||
csid = INTL_GetCSIDocCSID(c);
|
||||
if (csid == 0) {
|
||||
csid = INTL_DefaultDocCharSetID(context);
|
||||
}
|
||||
#ifdef MOZ_MAIL_NEWS
|
||||
else
|
||||
{
|
||||
csid = INTL_DefaultMailCharSetID(csid);
|
||||
/* Turn on the auto converter in case people do receive SJIS mail */
|
||||
if((CS_JIS == csid) || (CS_EUCJP == csid) || (CS_SJIS == csid) ||
|
||||
(CS_KSC_8BIT == csid) || (CS_2022_KR == csid))
|
||||
{
|
||||
csid |= CS_AUTO;
|
||||
}
|
||||
}
|
||||
#endif /* MOZ_MAIL_NEWS */
|
||||
#endif
|
||||
return csid;
|
||||
}
|
||||
#endif /*XP_MAC*/
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_MAIL_NEWS
|
||||
|
||||
/*
|
||||
INTL_ConvMailToWinCharCode
|
||||
Converts mail encoding to display charset which is used by current window.
|
||||
It decides which Display charset to use based on current default language.
|
||||
input:
|
||||
iDocumentContext context; the context (window ID)
|
||||
char *pSrc; // Source buffer
|
||||
uint32 block_size; the length of the source buffer
|
||||
output:
|
||||
char *pDest; // Destination buffer
|
||||
// pDest == NULL means either conversion fail
|
||||
// or does OneToOne conversion
|
||||
*/
|
||||
PUBLIC
|
||||
unsigned char *INTL_ConvMailToWinCharCode(iDocumentContext context,
|
||||
unsigned char *pSrc, uint32 block_size)
|
||||
{
|
||||
CCCDataObject obj;
|
||||
unsigned char *pDest;
|
||||
Stream stream;
|
||||
CCCFunc cvtfunc;
|
||||
int16 csid;
|
||||
|
||||
obj = INTL_CreateCharCodeConverter();
|
||||
if (obj == NULL)
|
||||
return 0;
|
||||
|
||||
(void) memset(&stream, 0, sizeof(stream));
|
||||
stream.window_id = context;
|
||||
|
||||
csid = FE_DefaultDocCharSetID(context);
|
||||
|
||||
/* Converts 7bit news codeset to 8bit windows Codeset. */
|
||||
(void) INTL_GetCharCodeConverter(csid, 0, obj);
|
||||
|
||||
|
||||
INTL_SetCCCReportAutoDetect(obj, mail_report_autodetect, context );
|
||||
|
||||
cvtfunc = INTL_GetCCCCvtfunc(obj);
|
||||
if (cvtfunc)
|
||||
pDest = (unsigned char *)cvtfunc(obj, pSrc, block_size);
|
||||
else
|
||||
pDest = NULL ;
|
||||
|
||||
XP_FREE(obj);
|
||||
if (pSrc == pDest)
|
||||
return NULL ;
|
||||
return pDest ;
|
||||
}
|
||||
#endif /* MOZ_MAIL_NEWS */
|
||||
|
||||
|
||||
#if defined(MOZ_MAIL_COMPOSE) || defined(MOZ_MAIL_NEWS)
|
||||
/*
|
||||
This is the ugly hack for Korean News and Mail
|
||||
Our libmsg code assume mail and news use the same code.
|
||||
Unfortunately, Korean use different encoding in news and mail
|
||||
We have to tell the DocToMailCoverter convert to different encoding
|
||||
according to the reciver.
|
||||
|
||||
Problem 1:
|
||||
It is easy to decide which encoding we should send if the receipt is
|
||||
only Newsgroup or only email. But what should we do if the receipt
|
||||
include both newsgroup and personal address ?
|
||||
|
||||
Currently we always send News encoding if the recipt include
|
||||
Newsgroup.
|
||||
|
||||
Problem 2:
|
||||
There are no way I can pass such information to the code between
|
||||
msgsendp.cpp and msgsend.cpp. So I create such a hack here.
|
||||
|
||||
*/
|
||||
static XP_Bool intl_message_to_newsgroup = FALSE;
|
||||
PUBLIC
|
||||
void
|
||||
INTL_MessageSendToNews(XP_Bool toNews)
|
||||
{
|
||||
intl_message_to_newsgroup = toNews;
|
||||
}
|
||||
|
||||
|
||||
|
||||
PUBLIC
|
||||
CCCDataObject
|
||||
INTL_CreateDocToMailConverter(iDocumentContext context, XP_Bool isHTML, unsigned char *buffer, uint32 buffer_size)
|
||||
{
|
||||
CCCDataObject selfObj;
|
||||
int16 p_doc_csid = CS_DEFAULT;
|
||||
#if defined(MOZ_MAIL_NEWS)
|
||||
int16 mail_news_csid;
|
||||
#endif
|
||||
CCCFunc cvtfunc;
|
||||
INTL_CharSetInfo c = LO_GetDocumentCharacterSetInfo(context);
|
||||
|
||||
/* Ok!! let's create the object here
|
||||
We need the conversion obj to keep the state information */
|
||||
selfObj = INTL_CreateCharCodeConverter();
|
||||
if(selfObj == NULL)
|
||||
return NULL;
|
||||
|
||||
/* First, let's determine the from_csid and to_csid */
|
||||
/* It is a TEXT_HTML !!! Let's use our PeekMetaCharsetTag to get a csid */
|
||||
if(isHTML)
|
||||
p_doc_csid = PeekMetaCharsetTag((char*) buffer, buffer_size);
|
||||
|
||||
if(p_doc_csid == CS_DEFAULT)
|
||||
{
|
||||
/* got default, try to get the doc_csid from context */
|
||||
if((context == 0 ) || (INTL_GetCSIDocCSID(c) == CS_DEFAULT))
|
||||
p_doc_csid = INTL_DefaultDocCharSetID(context);
|
||||
else
|
||||
p_doc_csid = INTL_GetCSIDocCSID(c);
|
||||
#ifdef XP_MAC
|
||||
/* To Make Macintosh happe when there is a HTML Mail composer send
|
||||
out plain text file. It put the MacRoman text into the temp file and then let this
|
||||
function load it. Because I change the mac version of INTL_DefaultDocCharSetID() so now
|
||||
it listen to the front window to tell me which doc csid it is. It is Latin1 in the
|
||||
case email. But the data is really MacRoman. So we add this hack here. Which only change
|
||||
the doccsid if it is not HTML
|
||||
*/
|
||||
|
||||
if(! isHTML)
|
||||
{
|
||||
switch(p_doc_csid)
|
||||
{
|
||||
case CS_LATIN1:
|
||||
p_doc_csid = CS_MAC_ROMAN;
|
||||
break;
|
||||
case CS_LATIN2:
|
||||
p_doc_csid = CS_MAC_CE;
|
||||
break;
|
||||
case CS_8859_5:
|
||||
case CS_KOI8_R:
|
||||
p_doc_csid = CS_MAC_CYRILLIC;
|
||||
break;
|
||||
case CS_8859_7:
|
||||
p_doc_csid = CS_MAC_GREEK;
|
||||
break;
|
||||
case CS_8859_9:
|
||||
p_doc_csid = CS_MAC_TURKISH;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* The doc_csid from the context (or default) has CS_AUTO bit. */
|
||||
/* So let's try to call the auto detection function */
|
||||
/* ftang add this: The CS_AUTO is still buggy, */
|
||||
if(
|
||||
(CS_JIS == p_doc_csid) || (CS_SJIS == p_doc_csid) || (CS_EUCJP == p_doc_csid) ||
|
||||
(CS_KSC_8BIT == p_doc_csid) || (CS_2022_KR == p_doc_csid) ||
|
||||
(CS_JIS_AUTO == p_doc_csid) || (CS_SJIS_AUTO == p_doc_csid) || (CS_EUCJP_AUTO == p_doc_csid) ||
|
||||
(CS_KSC_8BIT_AUTO == p_doc_csid) /* || (CS_2022_KR_AUTO == p_doc_csid) */
|
||||
)
|
||||
{
|
||||
uint16 default_csid = INTL_DefaultDocCharSetID(context);
|
||||
|
||||
switch(p_doc_csid & ~CS_AUTO)
|
||||
{
|
||||
case CS_JIS:
|
||||
case CS_SJIS:
|
||||
case CS_EUCJP:
|
||||
p_doc_csid = intl_detect_JCSID((uint16)(default_csid&~CS_AUTO), buffer, buffer_size);
|
||||
break;
|
||||
case CS_KSC_8BIT:
|
||||
case CS_2022_KR:
|
||||
p_doc_csid = intl_detect_KCSID((uint16)(default_csid&~CS_AUTO), buffer, buffer_size);
|
||||
break;
|
||||
/* Probably need to take care UCS2 / UTF8 and UTF7 here */
|
||||
case CS_BIG5:
|
||||
case CS_CNS_8BIT:
|
||||
case CS_UTF8:
|
||||
case CS_UTF7:
|
||||
case CS_UCS2:
|
||||
case CS_UCS2_SWAP:
|
||||
default:
|
||||
XP_ASSERT(FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#if defined(MOZ_MAIL_NEWS)
|
||||
mail_news_csid = (intl_message_to_newsgroup ? INTL_DefaultNewsCharSetID(p_doc_csid) :
|
||||
INTL_DefaultMailCharSetID(p_doc_csid));
|
||||
#endif
|
||||
/* Now, we get the converter */
|
||||
(void) INTL_GetCharCodeConverter(p_doc_csid,
|
||||
#ifdef MOZ_MAIL_NEWS
|
||||
(intl_message_to_newsgroup ?
|
||||
INTL_DefaultNewsCharSetID(p_doc_csid) :
|
||||
INTL_DefaultMailCharSetID(p_doc_csid)),
|
||||
#else /* must be MOZ_MAIL_COMPOSE */
|
||||
INTL_DefaultMailCharSetID(p_doc_csid),
|
||||
#endif /* MOZ_MAIL_NEWS */
|
||||
selfObj);
|
||||
#if defined(MOZ_MAIL_NEWS)
|
||||
/* If we sending JIS then listen the pref setting and decide if we convert
|
||||
* hankaku (1byte) to zenkaku (2byte) kana. The flag to be checked in
|
||||
* euc2jis and sjis2jis.
|
||||
*/
|
||||
if (CS_JIS == mail_news_csid && INTL_GetSendHankakuKana())
|
||||
{
|
||||
INTL_SetCCCCvtflag_SendHankakuKana(selfObj, TRUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If the cvtfunc == NULL, we don't need to do conversion */
|
||||
cvtfunc = INTL_GetCCCCvtfunc(selfObj);
|
||||
if(! (cvtfunc) )
|
||||
{
|
||||
XP_FREE(selfObj);
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
return selfObj;
|
||||
}
|
||||
|
||||
#endif /* MOZ_MAIL_COMPOSE */
|
||||
@ -1,244 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* euc2jis.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
#if defined(MOZ_MAIL_NEWS)
|
||||
#include "katakana.h"
|
||||
#endif
|
||||
|
||||
|
||||
extern int MK_OUT_OF_MEMORY;
|
||||
|
||||
|
||||
/* net_euc2jis(obj, eucbuf, eucbufsz)
|
||||
* Args:
|
||||
* eucbuf: Ptr to a buf of EUC chars
|
||||
* eucbufsz: Size in bytes of eucbuf
|
||||
* obj->eucmode: Ptr to encoding mode, use as arg for next call to
|
||||
* mz_euc2jis() for rest of current EUC data. First call should
|
||||
* initialize mode to ASCII (0).
|
||||
* uncvtbuf: If entire buffer was converted, uncvtbuf[0] will be nul,
|
||||
* else this points to EUC chars that were NOT converted
|
||||
* and mz_euc2jis() with additional EUC chars appended.
|
||||
* Return:
|
||||
* Returns NULL on failure, otherwise it returns a pointer to a buffer of
|
||||
* converted characters. Caller must XP_FREE() this memory.
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* Allocate destination buffer.
|
||||
*
|
||||
* Ouput JIS ESC sequences based upon which EUC code set.
|
||||
*
|
||||
* No conversion is needed for ASCII/JIS Roman characters.
|
||||
*
|
||||
* Clear 8th bit of 1-byte Half-width Katakana. Half-width Katakana
|
||||
* is not widely used and its ESC sequence may not be recognized
|
||||
* by some software. It's use on the internet is discouraged...
|
||||
*
|
||||
* Clear 8th bits of 2-byte JIS X 212-1990 chars. JIS-212
|
||||
* is not widely used and its ESC sequence may not be recognized
|
||||
* by some software. These chars do not have corresponding chars
|
||||
* in JIS-208 or SJIS.
|
||||
*
|
||||
* Clear 8th bits of 2-byte JIS X 208-1993 chars. These are the commonly
|
||||
* used chars (along with JIS-Roman).
|
||||
*
|
||||
* Bytes which do not fall in the EUC valid character codes are treated
|
||||
* like JIS-Roman.
|
||||
*
|
||||
* If either EUC buffer does not contain a complete EUC char or dest buffer
|
||||
* is full, then return unconverted EUC to caller. Caller should
|
||||
* append more data and recall mz_euc2jis.
|
||||
*/
|
||||
|
||||
|
||||
MODULE_PRIVATE unsigned char *
|
||||
mz_euc2jis( CCCDataObject obj,
|
||||
const unsigned char *eucbuf, /* EUC buffer for conversion */
|
||||
int32 eucbufsz) /* EUC buffer size in bytes */
|
||||
{
|
||||
unsigned char *tobuf = NULL;
|
||||
int32 tobufsz;
|
||||
register unsigned char *tobufp, *eucp; /* current byte in bufs */
|
||||
register unsigned char *tobufep, *eucep; /* end of buffers */
|
||||
int32 uncvtlen;
|
||||
unsigned char *uncvtbuf = INTL_GetCCCUncvtbuf(obj);
|
||||
#if defined(MOZ_MAIL_NEWS)
|
||||
unsigned char kanabuf[4]; /* for half-width kana */
|
||||
uint32 byteused; /* for half-width kana */
|
||||
#endif
|
||||
|
||||
/* Allocate a dest buffer: */
|
||||
/* JIS is longer than EUC because of ESC seq. In the worst case
|
||||
* ( <SS2> <Half-width Kana> <Roman> ... ), the converted JIS will
|
||||
* be 2-2/3 times the size of the original EUC + 1 for nul byte.
|
||||
* Worst case: single half-width kana:
|
||||
* ESC ( I KANA ESC ( J
|
||||
*/
|
||||
uncvtlen = strlen((const char *)uncvtbuf);
|
||||
/* 3 times length of EUC */
|
||||
tobufsz = eucbufsz + uncvtlen + ((eucbufsz + uncvtlen)<<2) + 8;
|
||||
if ((tobuf = (unsigned char *)XP_ALLOC(tobufsz)) == (unsigned char *)NULL) {
|
||||
INTL_SetCCCRetval(obj, MK_OUT_OF_MEMORY);
|
||||
return(NULL);
|
||||
}
|
||||
/* Initialize pointers, etc. */
|
||||
eucp = (unsigned char *)eucbuf;
|
||||
eucep = eucp + eucbufsz - 1;
|
||||
|
||||
#define uncvtp tobufp /* use tobufp as temp */
|
||||
/* If prev. unconverted chars, append unconverted
|
||||
* chars w/new chars and try to process.
|
||||
*/
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
uncvtp = (unsigned char *)uncvtbuf + uncvtlen;
|
||||
while (uncvtp < ((unsigned char *)uncvtbuf + UNCVTBUF_SIZE) &&
|
||||
eucp <= eucep)
|
||||
*uncvtp++ = *eucp++;
|
||||
*uncvtp = '\0'; /* nul terminate */
|
||||
eucp = (unsigned char *)uncvtbuf; /* process unconverted first */
|
||||
eucep = uncvtp - 1;
|
||||
}
|
||||
#undef uncvtp
|
||||
|
||||
tobufp = tobuf;
|
||||
tobufep = tobufp + tobufsz - 2; /* save space for terminating null */
|
||||
|
||||
WHILELOOP:
|
||||
/* While EUC data && space in dest. buf. */
|
||||
while ((tobufp <= tobufep) && (eucp <= eucep)) {
|
||||
if (*eucp < SS2) { /* ASCII/JIS-Roman or invalid EUC */
|
||||
if (INTL_GetCCCJismode(obj) != JIS_Roman) {
|
||||
InsASCII_ESC(tobufp, obj);
|
||||
}
|
||||
*tobufp++ = *eucp++;
|
||||
} else if (*eucp == SS2) { /* Half-width Katakana */
|
||||
if (eucp+1 > eucep) /* No 2nd byte in EUC buffer? */
|
||||
break;
|
||||
#if defined(MOZ_MAIL_NEWS)
|
||||
if (!INTL_GetCCCCvtflag_SendHankakuKana(obj)) {
|
||||
if (INTL_GetCCCJismode(obj) != JIS_208_83) {
|
||||
Ins208_83_ESC(tobufp, obj);
|
||||
}
|
||||
INTL_SjisHalf2FullKana(eucp, (uint32)eucep - (uint32)eucp + 1, kanabuf, &byteused);
|
||||
*tobufp++ = kanabuf[0] & 0x7F;
|
||||
*tobufp++ = kanabuf[1] & 0x7F;
|
||||
eucp += byteused;
|
||||
} else {
|
||||
if (INTL_GetCCCJismode(obj) != JIS_HalfKana) {
|
||||
InsHalfKana_ESC(tobufp, obj);
|
||||
}
|
||||
eucp++; /* skip SS2 */
|
||||
*tobufp++ = *eucp & 0x7F;
|
||||
eucp++;
|
||||
}
|
||||
#else
|
||||
if (INTL_GetCCCJismode(obj) != JIS_HalfKana) {
|
||||
InsHalfKana_ESC(tobufp, obj);
|
||||
}
|
||||
eucp++; /* skip SS2 */
|
||||
*tobufp++ = *eucp & 0x7F;
|
||||
eucp++;
|
||||
#endif
|
||||
|
||||
} else if (*eucp == SS3) { /* JIS X 0212-1990 */
|
||||
if (eucp+2 > eucep) /* No 2nd & 3rd bytes in EUC buffer? */
|
||||
break;
|
||||
if (*(eucp+1) <= 0xA0 || *(eucp+2) <= 0xA0) { /* Invalid EUC212 */
|
||||
if (INTL_GetCCCJismode(obj) != JIS_Roman) {
|
||||
InsASCII_ESC(tobufp, obj);
|
||||
}
|
||||
*tobufp++ = *eucp++; /* process 1 byte as Roman */
|
||||
} else {
|
||||
if (INTL_GetCCCJismode(obj) != JIS_212_90) {
|
||||
Ins212_90_ESC(tobufp, obj);
|
||||
}
|
||||
eucp++; /* skip SS3 */
|
||||
*tobufp++ = *eucp & 0x7F;
|
||||
eucp++;
|
||||
*tobufp++ = *eucp & 0x7F;
|
||||
eucp++;
|
||||
}
|
||||
} else if (*eucp < 0xA0) { /* Invalid EUC: treat as Roman */
|
||||
if (INTL_GetCCCJismode(obj) != JIS_Roman) {
|
||||
InsASCII_ESC(tobufp, obj);
|
||||
}
|
||||
*tobufp++ = *eucp++;
|
||||
} else { /* JIS X 0208-1990 */
|
||||
if (eucp+1 > eucep) /* No 2nd byte in EUC buffer? */
|
||||
break;
|
||||
if (*(eucp+1) < 0xA0) { /* 1st byte OK, check if 2nd is valid */
|
||||
if (INTL_GetCCCJismode(obj) != JIS_Roman) {
|
||||
InsASCII_ESC(tobufp, obj);
|
||||
}
|
||||
*tobufp++ = *eucp++; /* process 1 byte as Roman */
|
||||
} else {
|
||||
if (INTL_GetCCCJismode(obj) != JIS_208_83) {
|
||||
Ins208_83_ESC(tobufp, obj);
|
||||
}
|
||||
*tobufp++ = *eucp & 0x7F;
|
||||
eucp++;
|
||||
*tobufp++ = *eucp & 0x7F;
|
||||
eucp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
/* Just processed unconverted chars:
|
||||
* eucp pts to 1st unprocessed char in
|
||||
* eucbuf. Some may have been processed
|
||||
* while processing unconverted chars,
|
||||
* so set up ptrs not to process them
|
||||
* twice.
|
||||
*/
|
||||
/* If nothing was converted, this can
|
||||
* only happen if there was not
|
||||
* enough EUC data. Stop and get
|
||||
* more data.
|
||||
*/
|
||||
if (eucp == (unsigned char *)uncvtbuf) { /* Nothing converted */
|
||||
*tobufp = '\0';
|
||||
return(NULL);
|
||||
}
|
||||
eucp = (unsigned char *)eucbuf +
|
||||
(eucp - (unsigned char *)uncvtbuf - uncvtlen);
|
||||
eucep = (unsigned char *)eucbuf + eucbufsz - 1; /* save space for nul */
|
||||
uncvtbuf[0] = '\0'; /* No more uncoverted chars. */
|
||||
goto WHILELOOP; /* Process new data */
|
||||
}
|
||||
|
||||
if (INTL_GetCCCJismode(obj) != JIS_Roman) {
|
||||
INTL_SetCCCJismode(obj, JIS_Roman);
|
||||
InsASCII_ESC(tobufp, obj);
|
||||
}
|
||||
|
||||
*tobufp = '\0'; /* null terminate dest. data */
|
||||
INTL_SetCCCLen(obj, tobufp - tobuf); /* length not counting null */
|
||||
|
||||
if (eucp <= eucep) { /* uncoverted EUC? */
|
||||
tobufp = (unsigned char *)uncvtbuf;/* reuse the tobufp as a TEMP */
|
||||
while (eucp <= eucep)
|
||||
*tobufp++ = *eucp++;
|
||||
*tobufp = '\0'; /* null terminate */
|
||||
}
|
||||
return(tobuf);
|
||||
}
|
||||
|
||||
@ -1,193 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* euc2sjis.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
|
||||
extern int MK_OUT_OF_MEMORY;
|
||||
|
||||
|
||||
/* net_euc2sjis(obj, eucbuf, eucbufsz)
|
||||
* Args:
|
||||
* eucbuf: Ptr to a buf of EUC chars
|
||||
* eucbufsz: Size in bytes of eucbuf
|
||||
* uncvtbuf: If entire buffer was converted, uncvtbuf[0] will be nul,
|
||||
* else this points to EUC chars that were NOT converted
|
||||
* and mz_euc2sjis() with additional EUC chars appended.
|
||||
* Return:
|
||||
* Returns NULL on failure, otherwise it returns a pointer to a buffer of
|
||||
* converted characters. Caller must XP_FREE() this memory.
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* Allocate destination buffer.
|
||||
*
|
||||
* All bytes < SS2 (0x8E) are either ASCII/Roman or invalid. Treat them
|
||||
* as ASCII/Roman and just copy them unchanged.
|
||||
*
|
||||
* If SS2, then the next byte should be a Half-width Katakana, just copy
|
||||
* it unchanged after disposing of the SS2 byte.
|
||||
*
|
||||
* If SS3, then the next 2 bytes should be JIS x212. If the bytes
|
||||
* are not in the valide range for JIS x212, then copy the SS3 and
|
||||
* continue. Leave the 2 byte to be processed from the beginning.
|
||||
*
|
||||
* If the next byte < 0xA0, this is not valid EUC, so treat it as
|
||||
* ASCII/Roman and just copy it unchanged.
|
||||
*
|
||||
* If the next 2 bytes are both >= 0xA0, then this is a valid 2-byte
|
||||
* x208, so convert them to SJIS. Otherwise, copy the 1st byte and
|
||||
* continue.
|
||||
*/
|
||||
|
||||
|
||||
MODULE_PRIVATE unsigned char *
|
||||
mz_euc2sjis( CCCDataObject obj,
|
||||
const unsigned char *eucbuf, /* EUC buffer for conversion */
|
||||
int32 eucbufsz) /* EUC buffer size in bytes */
|
||||
{
|
||||
char unsigned *tobuf = NULL;
|
||||
int32 tobufsz;
|
||||
register unsigned char *tobufp, *eucp; /* current byte in bufs */
|
||||
register unsigned char *tobufep, *eucep; /* end of buffers */
|
||||
int32 uncvtlen;
|
||||
unsigned char *uncvtbuf = INTL_GetCCCUncvtbuf(obj);
|
||||
|
||||
/* Allocate a dest buffer: */
|
||||
/* Usually EUC will be the same length as SJIS. SJIS will be shorter
|
||||
* if Half-width Kana are used, but in the worst case, the converted
|
||||
* SJIS will be the same size as the orignal EUC + 1 for nul byte.
|
||||
*/
|
||||
uncvtlen = strlen((char *)uncvtbuf);
|
||||
tobufsz = eucbufsz + uncvtlen + 1;
|
||||
if ((tobuf = (unsigned char *)XP_ALLOC(tobufsz)) == (unsigned char *)NULL) {
|
||||
INTL_SetCCCRetval(obj, MK_OUT_OF_MEMORY);
|
||||
return(NULL);
|
||||
}
|
||||
/* Initialize pointers, etc. */
|
||||
eucp = (unsigned char *)eucbuf;
|
||||
eucep = eucp + eucbufsz - 1;
|
||||
|
||||
#define uncvtp tobufp /* use tobufp as temp */
|
||||
/* If prev. unconverted chars, append unconverted
|
||||
* chars w/new chars and try to process.
|
||||
*/
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
uncvtp = uncvtbuf + uncvtlen;
|
||||
while (uncvtp < (uncvtbuf + UNCVTBUF_SIZE) &&
|
||||
eucp <= eucep)
|
||||
*uncvtp++ = *eucp++;
|
||||
*uncvtp = '\0'; /* nul terminate */
|
||||
eucp = uncvtbuf; /* process unconverted first */
|
||||
eucep = uncvtp - 1;
|
||||
}
|
||||
#undef uncvtp
|
||||
|
||||
tobufp = tobuf;
|
||||
tobufep = tobufp + tobufsz - 2; /* save space for terminating null */
|
||||
|
||||
WHILELOOP:
|
||||
/* While EUC data && space in dest. buf. */
|
||||
while ((tobufp <= tobufep) && (eucp <= eucep)) {
|
||||
if (*eucp < SS2) { /* ASCII/JIS-Roman/invalid EUC */
|
||||
*tobufp++ = *eucp++;
|
||||
} else if (*eucp == SS2) { /* Half-width katakana */
|
||||
if (eucp+1 > eucep) /* No 2nd byte in EUC buffer? */
|
||||
break;
|
||||
eucp++; /* Dispose of SS2 */
|
||||
*tobufp++ = *eucp++;
|
||||
|
||||
} else if (*eucp == SS3) { /* JIS X 0212-1990 */
|
||||
if (eucp+2 > eucep) /* No 2nd & 3rd bytes in EUC buffer? */
|
||||
break;
|
||||
if (*eucp < 0xA0 || *(eucp+1) < 0xA0) { /* Invalid EUC212 */
|
||||
*tobufp++ = *eucp++; /* process SS3 only */
|
||||
} else {
|
||||
*tobufp++ = *eucp++; /* SS3 */
|
||||
*tobufp++ = *eucp++; /* 1st 212 byte unconverted */
|
||||
*tobufp++ = *eucp++; /* 2nd 212 byte unconverted */
|
||||
}
|
||||
} else if (*eucp < 0xA0) { /* Invalid EUC: treat as Roman */
|
||||
*tobufp++ = *eucp++;
|
||||
} else { /* JIS X 0208 */
|
||||
if (eucp+1 > eucep) /* No 2nd byte in EUC buffer? */
|
||||
break;
|
||||
if (*(eucp+1) < 0xA0) { /* 1st byte OK, check if 2nd is valid */
|
||||
*tobufp++ = *eucp++; /* process 1 byte as Roman */
|
||||
|
||||
} else { /* Convert EUC-208 to SJIS: Same as */
|
||||
/* jis2other.c's JIS208-to-SJIS algorithm */
|
||||
/* except JIS 8th bit is set. */
|
||||
unsigned char b;
|
||||
b = ((*eucp) & 0x7F); /* Convert 1st EUC byte to JIS */
|
||||
if (b < 0x5F) /* Convert it to SJIS byte */
|
||||
*tobufp++ = ((b + 1) >> 1) + 0x70;
|
||||
else
|
||||
*tobufp++ = ((b + 1) >> 1) + 0xB0;
|
||||
/* Convert 2nd SJIS byte */
|
||||
if ((*eucp++) & 1) { /* if 1st JIS byte is odd */
|
||||
b = ((*eucp) & 0x7F); /* convert 2nd EUC byte to JIS */
|
||||
if (b > 0x5F)
|
||||
*tobufp = b + 0x20;
|
||||
else
|
||||
*tobufp = b + 0x1F;
|
||||
} else {
|
||||
*tobufp = (*eucp & 0x7F) + 0x7E;
|
||||
}
|
||||
tobufp++;
|
||||
eucp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
/* Just processed unconverted chars:
|
||||
* eucp pts to 1st unprocessed char in
|
||||
* eucbuf. Some may have been processed
|
||||
* while processing unconverted chars,
|
||||
* so set up ptrs not to process them
|
||||
* twice.
|
||||
*/
|
||||
/* If nothing was converted, this can
|
||||
* only happen if there was not
|
||||
* enough EUC data. Stop and get
|
||||
* more data.
|
||||
*/
|
||||
if (eucp == uncvtbuf) { /* Nothing converted */
|
||||
*tobufp = '\0';
|
||||
return(NULL);
|
||||
}
|
||||
eucp = (unsigned char *)eucbuf + (eucp - uncvtbuf - uncvtlen);
|
||||
eucep = (unsigned char *)eucbuf + eucbufsz - 1; /* save space for nul */
|
||||
uncvtbuf[0] = '\0'; /* No more uncoverted chars. */
|
||||
goto WHILELOOP; /* Process new data */
|
||||
}
|
||||
|
||||
*tobufp = '\0'; /* null terminate dest. data */
|
||||
INTL_SetCCCLen(obj, tobufp - tobuf); /* length not counting null */
|
||||
|
||||
if (eucp <= eucep) { /* uncoverted EUC? */
|
||||
tobufp = uncvtbuf; /* reuse the tobufp as a TEMP */
|
||||
while (eucp <= eucep)
|
||||
*tobufp++ = *eucp++;
|
||||
*tobufp = '\0'; /* null terminate */
|
||||
}
|
||||
return(tobuf);
|
||||
}
|
||||
|
||||
@ -1,117 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* euc-kt to iso2022-kr */
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
|
||||
extern int MK_OUT_OF_MEMORY;
|
||||
|
||||
|
||||
/* net_euckr2iso(obj, eucbuf, eucbufsz)
|
||||
* Args:
|
||||
* eucbuf: Ptr to a buf of EUC chars
|
||||
* eucbufsz: Size in bytes of eucbuf
|
||||
* uncvtbuf: If entire buffer was converted, uncvtbuf[0] will be nul,
|
||||
* else this points to EUC chars that were NOT converted
|
||||
* and mz_euckr2iso() with additional EUC chars appended.
|
||||
* Return:
|
||||
* Returns NULL on failure, otherwise it returns a pointer to a buffer of
|
||||
* converted characters. Caller must XP_FREE() this memory.
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
rewrite by Frank Tang
|
||||
|
||||
About Unconverted Buffer:
|
||||
Since ISO-2022-KR will never be used as internal code. We do not need to make
|
||||
sure the output stream do not have partial characters. Therefore, we could
|
||||
ignore the unconverted buffer and never use it. We always treat the
|
||||
stream in a byte oriented way.
|
||||
|
||||
*/
|
||||
|
||||
MODULE_PRIVATE unsigned char *
|
||||
mz_euckr2iso( CCCDataObject obj,
|
||||
const unsigned char *eucbuf, /* EUC buffer for conversion */
|
||||
int32 eucbufsz) /* EUC buffer size in bytes */
|
||||
{
|
||||
char unsigned *tobuf = NULL;
|
||||
int32 tobufsz;
|
||||
register unsigned char *tobufp, *eucp; /* current byte in bufs */
|
||||
register unsigned char *tobufep, *eucep; /* end of buffers */
|
||||
|
||||
/* Allocate a dest buffer:
|
||||
|
||||
4 bytes: ESC $ ) C
|
||||
2 bytes: CR LF
|
||||
* 2: SI + one byte
|
||||
1 bytes: SI
|
||||
1 bytes: NULL
|
||||
|
||||
*/
|
||||
|
||||
tobufsz = 4 + 2 + eucbufsz * 2 + 1 + 1;
|
||||
|
||||
|
||||
if ((tobuf = (unsigned char *)XP_ALLOC(tobufsz)) == (unsigned char *)NULL) {
|
||||
INTL_SetCCCRetval(obj, MK_OUT_OF_MEMORY);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
tobufp = tobuf;
|
||||
tobufep = tobufp + tobufsz - 3; /* save space for terminating null */
|
||||
eucp = (unsigned char *)eucbuf;
|
||||
eucep = (unsigned char *)eucbuf + eucbufsz - 1; /* save space for nul */
|
||||
|
||||
if (!IsIns5601_87_ESC(obj))
|
||||
{
|
||||
Ins5601_87_ESC(tobufp, obj);
|
||||
*tobufp++ = (unsigned char)CR;
|
||||
*tobufp++ = (unsigned char)NL;
|
||||
}
|
||||
|
||||
|
||||
while ((tobufp <= tobufep) && (eucp <= eucep))
|
||||
{
|
||||
|
||||
if (*eucp & 0x80) {
|
||||
if (IsIns5601_87_SI(obj))
|
||||
Ins5601_87_SO(tobufp, obj);
|
||||
*tobufp++ = *eucp++ & 0x7f;
|
||||
}
|
||||
else {
|
||||
if(IsIns5601_87_SO(obj))
|
||||
Ins5601_87_SI(tobufp, obj);
|
||||
*tobufp++ = *eucp++;
|
||||
}
|
||||
}
|
||||
|
||||
if(IsIns5601_87_SO(obj))
|
||||
Ins5601_87_SI(tobufp, obj);
|
||||
|
||||
*tobufp = '\0'; /* null terminate dest. data */
|
||||
INTL_SetCCCLen(obj, tobufp - tobuf); /* length not counting null */
|
||||
|
||||
return(tobuf);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* fontencd.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
|
||||
@ -1,399 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* intl_csi.c International Character Set Information
|
||||
*
|
||||
* This file contains the INTL_CSI accessor functions
|
||||
*
|
||||
* This allows the i18n character set data to be
|
||||
* changed without (hopefully) changing all the
|
||||
* code that accesses it.
|
||||
*
|
||||
* UNFORTUNATELY, as of this date Oct. 28, 1996
|
||||
* there is not document context so we are still
|
||||
* using the old MWContext.
|
||||
* When this is fix all that is needed should
|
||||
* be change the USE_REAL_DOCUMENT_CONTEXT flag
|
||||
* and recompile (and test of course).
|
||||
*/
|
||||
|
||||
#include "intlpriv.h"
|
||||
#include "xp.h"
|
||||
#include "libi18n.h"
|
||||
#include "intl_csi.h"
|
||||
|
||||
struct OpaqueINTL_CharSetInfo {
|
||||
uint16 doc_csid;
|
||||
uint16 http_doc_csid;
|
||||
uint16 meta_doc_csid;
|
||||
uint16 override_doc_csid;
|
||||
uint16 win_csid;
|
||||
unsigned char *mime_charset;
|
||||
int relayout;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
OVERRIDE_CSID_TYPE,
|
||||
HTTP_CSID_TYPE,
|
||||
META_CSID_TYPE,
|
||||
DOC_CSID_TYPE
|
||||
} CsidType;
|
||||
|
||||
PRIVATE uint16 get_charset_tag(char *charset_tag);
|
||||
|
||||
/*
|
||||
*
|
||||
* Setup the character set info
|
||||
*
|
||||
*/
|
||||
void
|
||||
INTL_CSIInitialize(INTL_CharSetInfo c, XP_Bool is_metacharset_reload,
|
||||
char *http_charset, int doc_type, uint16 default_doc_csid)
|
||||
{
|
||||
uint16 http_doc_csid = get_charset_tag(http_charset);
|
||||
uint16 win_csid;
|
||||
|
||||
XP_ASSERT(NULL != c);
|
||||
/*
|
||||
* Initiliaze the Character-Set-Info (CSI)
|
||||
* (unless if we are doing a meta_charset_reload)
|
||||
*/
|
||||
if (!is_metacharset_reload)
|
||||
INTL_CSIReset(c);
|
||||
|
||||
/*
|
||||
* Setup the CSI with the information we currently know
|
||||
*/
|
||||
|
||||
/* first check if this is a metacharset reload */
|
||||
if (is_metacharset_reload)
|
||||
{
|
||||
INTL_SetCSIRelayoutFlag(c, METACHARSET_RELAYOUTDONE);
|
||||
}
|
||||
/* Check for a doc csid override */
|
||||
else if (DOC_CSID_KNOWN(INTL_GetCSIOverrideDocCSID(c)))
|
||||
{
|
||||
INTL_SetCSIDocCSID(c, INTL_GetCSIOverrideDocCSID(c));
|
||||
}
|
||||
/* if we have a HTTP charset tag then use it */
|
||||
else if (DOC_CSID_KNOWN(http_doc_csid))
|
||||
{
|
||||
INTL_SetCSIHTTPDocCSID(c, http_doc_csid);
|
||||
}
|
||||
else /* normal case */
|
||||
{
|
||||
uint16 init_doc_csid = default_doc_csid;
|
||||
/*
|
||||
* mail/news sometimes has the wrong meta charset
|
||||
* so for mail/news we always ignore the meta charset tag
|
||||
* which causes us to use the encoding the user set in the
|
||||
* encoding menu
|
||||
*/
|
||||
if (!(MAIL_NEWS_TYPE(doc_type)))
|
||||
init_doc_csid = CS_DEFAULT;
|
||||
|
||||
#ifdef XP_UNIX
|
||||
/*
|
||||
* The PostScript and Text FEs inherit the doc_csid from
|
||||
* the parent context in order to pick up the per-window
|
||||
* default. Apparently, this already works for some
|
||||
* reason on Windows. Don't know about Mac. -- erik
|
||||
*/
|
||||
if ((doc_type != MWContextPostScript) &&
|
||||
(doc_type != MWContextText))
|
||||
#endif /* XP_UNIX */
|
||||
INTL_SetCSIDocCSID(c, init_doc_csid /*CS_DEFAULT*/ );
|
||||
}
|
||||
|
||||
/*
|
||||
* alot of code (parsing/layout/FE) wants to know
|
||||
* the encoding so we must set something
|
||||
*/
|
||||
if (DOC_CSID_KNOWN(INTL_GetCSIDocCSID(c)))
|
||||
win_csid = INTL_DocToWinCharSetID(INTL_GetCSIDocCSID(c));
|
||||
else
|
||||
win_csid = INTL_DocToWinCharSetID(default_doc_csid);
|
||||
INTL_SetCSIWinCSID(c, win_csid); /* true until we know otherwise */
|
||||
}
|
||||
|
||||
PRIVATE void
|
||||
set_csid(INTL_CharSetInfo c, uint16 csid, CsidType type)
|
||||
{
|
||||
XP_ASSERT(NULL != c);
|
||||
|
||||
if (OVERRIDE_CSID_TYPE == type)
|
||||
{
|
||||
c->override_doc_csid = csid;
|
||||
c->doc_csid = csid;
|
||||
}
|
||||
else if (HTTP_CSID_TYPE == type)
|
||||
{
|
||||
c->http_doc_csid = csid;
|
||||
if (CS_DEFAULT == c->override_doc_csid)
|
||||
c->doc_csid = csid;
|
||||
}
|
||||
else if (META_CSID_TYPE == type)
|
||||
{
|
||||
c->meta_doc_csid = csid;
|
||||
if ( (CS_DEFAULT == c->override_doc_csid)
|
||||
&& (CS_DEFAULT == c->http_doc_csid))
|
||||
c->doc_csid = csid;
|
||||
}
|
||||
else if (DOC_CSID_TYPE == type)
|
||||
{
|
||||
if ( (CS_DEFAULT == c->override_doc_csid)
|
||||
&& (CS_DEFAULT == c->http_doc_csid)
|
||||
&& (CS_DEFAULT == c->meta_doc_csid))
|
||||
c->doc_csid = csid;
|
||||
}
|
||||
else
|
||||
{
|
||||
XP_ASSERT(0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
INTL_CSIReportMetaCharsetTag(INTL_CharSetInfo c, char *charset_tag, int type)
|
||||
{
|
||||
int16 doc_csid;
|
||||
|
||||
XP_ASSERT(charset_tag);
|
||||
doc_csid = INTL_CharSetNameToID(charset_tag);
|
||||
|
||||
/* ignore invalid tags */
|
||||
if (doc_csid == CS_UNKNOWN)
|
||||
return;
|
||||
|
||||
/* mail and news ignores meta charset tags since some are wrong */
|
||||
if (MAIL_NEWS_TYPE(type))
|
||||
return;
|
||||
|
||||
/* only honor the first (meta or http) charset tag */
|
||||
if (INTL_GetCSIRelayoutFlag(c) == METACHARSET_NONE)
|
||||
{
|
||||
uint16 old_doc_csid = INTL_GetCSIDocCSID(c);
|
||||
|
||||
INTL_SetCSIMetaDocCSID(c, doc_csid);
|
||||
/* ignore subsequent meta charset tags */
|
||||
INTL_SetCSIRelayoutFlag(c, METACHARSET_HASCHARSET);
|
||||
|
||||
/*
|
||||
* if we already set up the converter wrong we have to reload
|
||||
*/
|
||||
if (DOC_CSID_KNOWN(old_doc_csid)
|
||||
&& ((old_doc_csid & ~CS_AUTO) != doc_csid))
|
||||
INTL_SetCSIRelayoutFlag(c, METACHARSET_REQUESTRELAYOUT);
|
||||
/*
|
||||
* if we told the FE the wrong win_csid we have to reload
|
||||
* (we had to tell the FE something so it could do layout
|
||||
* while we were looking for the metacharset tag)
|
||||
*/
|
||||
else if (INTL_DocToWinCharSetID(doc_csid) != INTL_GetCSIWinCSID(c))
|
||||
INTL_SetCSIRelayoutFlag(c, METACHARSET_REQUESTRELAYOUT);
|
||||
}
|
||||
}
|
||||
|
||||
PRIVATE uint16 get_charset_tag(char *charset_tag)
|
||||
{
|
||||
uint16 csid;
|
||||
|
||||
/* validate the http_charset */
|
||||
if ((NULL == charset_tag) || ('\0' == *charset_tag))
|
||||
return CS_UNKNOWN;
|
||||
|
||||
csid = INTL_CharSetNameToID(charset_tag);
|
||||
|
||||
if (CS_DEFAULT == csid)
|
||||
csid = CS_UNKNOWN;
|
||||
|
||||
return csid;
|
||||
}
|
||||
|
||||
|
||||
INTL_CharSetInfo
|
||||
LO_GetDocumentCharacterSetInfo(MWContext *context)
|
||||
{
|
||||
XP_ASSERT(context);
|
||||
XP_ASSERT(INTL_TAG == context->INTL_tag);
|
||||
XP_ASSERT(NULL != context->INTL_CSIInfo);
|
||||
return(context->INTL_CSIInfo);
|
||||
}
|
||||
|
||||
|
||||
INTL_CharSetInfo
|
||||
INTL_CSICreate(void)
|
||||
{
|
||||
INTL_CharSetInfo c;
|
||||
|
||||
#if (defined(DEBUG_bstell) || defined(DEBUG_nhotta) || defined(DEBUG_ftang))
|
||||
#define BSTELLS_FREE_TRICK_OFFSET 64
|
||||
/* I use (abuse) the malloc system to find improper frees */
|
||||
{
|
||||
char *p;
|
||||
p = (char *)XP_CALLOC(1,
|
||||
BSTELLS_FREE_TRICK_OFFSET+sizeof(struct OpaqueINTL_CharSetInfo));
|
||||
c = (INTL_CharSetInfo)(p + BSTELLS_FREE_TRICK_OFFSET);
|
||||
}
|
||||
#else
|
||||
c = (INTL_CharSetInfo)XP_CALLOC(1, sizeof(struct OpaqueINTL_CharSetInfo));
|
||||
#endif
|
||||
return c;
|
||||
}
|
||||
|
||||
void
|
||||
INTL_CSIDestroy(INTL_CharSetInfo c)
|
||||
{
|
||||
XP_ASSERT(c);
|
||||
#if (defined(DEBUG_bstell) || defined(DEBUG_nhotta) || defined(DEBUG_ftang))
|
||||
{
|
||||
char *p = (char *)c;
|
||||
XP_FREE(p - BSTELLS_FREE_TRICK_OFFSET);
|
||||
}
|
||||
#else
|
||||
XP_FREE(c);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
INTL_CSIReset(INTL_CharSetInfo c)
|
||||
{
|
||||
INTL_SetCSIOverrideDocCSID (c, CS_DEFAULT);
|
||||
INTL_SetCSIHTTPDocCSID (c, CS_DEFAULT);
|
||||
INTL_SetCSIMetaDocCSID (c, CS_DEFAULT);
|
||||
INTL_SetCSIDocCSID (c, CS_DEFAULT);
|
||||
INTL_SetCSIWinCSID (c, CS_DEFAULT);
|
||||
INTL_SetCSIMimeCharset(c, NULL);
|
||||
INTL_SetCSIRelayoutFlag(c, METACHARSET_NONE);
|
||||
}
|
||||
|
||||
/* ----------- CSI CSID ----------- */
|
||||
/* Override is strongest. Must set doc_csid */
|
||||
void
|
||||
INTL_SetCSIOverrideDocCSID (INTL_CharSetInfo c, int16 doc_csid)
|
||||
{
|
||||
set_csid(c, doc_csid, OVERRIDE_CSID_TYPE);
|
||||
}
|
||||
|
||||
/* Next strongest. Set doc_csid if no override */
|
||||
void
|
||||
INTL_SetCSIHTTPDocCSID (INTL_CharSetInfo c, int16 doc_csid)
|
||||
{
|
||||
set_csid(c, doc_csid, HTTP_CSID_TYPE);
|
||||
}
|
||||
|
||||
/* Next strongest. Set doc_csid if no override */
|
||||
void
|
||||
INTL_SetCSIMetaDocCSID (INTL_CharSetInfo c, int16 doc_csid)
|
||||
{
|
||||
set_csid(c, doc_csid, META_CSID_TYPE);
|
||||
}
|
||||
|
||||
/* Meta charset is weakest. Only set doc_csid if no http or override */
|
||||
void
|
||||
INTL_SetCSIDocCSID (INTL_CharSetInfo c, int16 doc_csid)
|
||||
{
|
||||
set_csid(c, doc_csid, DOC_CSID_TYPE);
|
||||
}
|
||||
|
||||
int16
|
||||
INTL_GetCSIDocCSID(INTL_CharSetInfo c)
|
||||
{
|
||||
XP_ASSERT(c);
|
||||
return c->doc_csid;
|
||||
}
|
||||
|
||||
int16
|
||||
INTL_GetCSIMetaDocCSID(INTL_CharSetInfo c)
|
||||
{
|
||||
XP_ASSERT(c);
|
||||
return c->meta_doc_csid;
|
||||
}
|
||||
|
||||
int16
|
||||
INTL_GetCSIOverrideDocCSID(INTL_CharSetInfo c)
|
||||
{
|
||||
XP_ASSERT(c);
|
||||
return c->override_doc_csid;
|
||||
}
|
||||
|
||||
/* ----------- Window CSID ----------- */
|
||||
|
||||
void
|
||||
INTL_SetCSIWinCSID(INTL_CharSetInfo c, int16 win_csid)
|
||||
{
|
||||
XP_ASSERT(c);
|
||||
c->win_csid = win_csid;
|
||||
}
|
||||
|
||||
int16
|
||||
INTL_GetCSIWinCSID(INTL_CharSetInfo c)
|
||||
{
|
||||
XP_ASSERT(c);
|
||||
return c->win_csid;
|
||||
}
|
||||
|
||||
/* ----------- Mime CSID ----------- */
|
||||
char *
|
||||
INTL_GetCSIMimeCharset (INTL_CharSetInfo c)
|
||||
{
|
||||
XP_ASSERT(c);
|
||||
return (char *)c->mime_charset;
|
||||
}
|
||||
|
||||
void
|
||||
INTL_SetCSIMimeCharset(INTL_CharSetInfo c, char *mime_charset)
|
||||
{
|
||||
unsigned char *p;
|
||||
XP_ASSERT(c);
|
||||
|
||||
if (c->mime_charset)
|
||||
{
|
||||
XP_FREE(c->mime_charset);
|
||||
c->mime_charset = NULL;
|
||||
}
|
||||
|
||||
if (NULL == mime_charset)
|
||||
return;
|
||||
|
||||
c->mime_charset = (unsigned char *)XP_STRDUP(mime_charset);
|
||||
if (NULL == c->mime_charset)
|
||||
return;
|
||||
|
||||
/* Legitimate charset names must be in ASCII and case insensitive */
|
||||
/* convert to lower case */
|
||||
for (p=c->mime_charset; *p; p++)
|
||||
*p = tolower(*p);
|
||||
return;
|
||||
}
|
||||
|
||||
/* ----------- Relayout Flag ----------- */
|
||||
int16
|
||||
INTL_GetCSIRelayoutFlag(INTL_CharSetInfo c)
|
||||
{
|
||||
XP_ASSERT(c);
|
||||
return c->relayout;
|
||||
}
|
||||
|
||||
void
|
||||
INTL_SetCSIRelayoutFlag(INTL_CharSetInfo c, int16 relayout)
|
||||
{
|
||||
XP_ASSERT(c);
|
||||
c->relayout = relayout;
|
||||
}
|
||||
|
||||
|
||||
@ -1,634 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* intlcomp.c */
|
||||
/*
|
||||
This file implement
|
||||
INTL_MatchOneChar
|
||||
INTL_MatchOneCaseChar
|
||||
INTL_Strstr
|
||||
INTL_Strcasestr
|
||||
*/
|
||||
#include "intlpriv.h"
|
||||
#include "pintlcmp.h"
|
||||
#if defined(XP_MAC)
|
||||
#include <TextUtils.h>
|
||||
#endif
|
||||
|
||||
#define CHECK_CSID_AND_ASSERT(csid) \
|
||||
{ \
|
||||
XP_ASSERT(CS_UNKNOWN != (csid)); /* Please don't pass in CS_UNKNOWN here, you need to know the csid */ \
|
||||
XP_ASSERT(CS_DEFAULT != (csid)); /* Please don't pass in CS_DEFAULT here, you need to know the csid */ \
|
||||
XP_ASSERT(CS_ASCII != (csid)); /* Please don't pass in CS_ASCII here, you need to know the csid */ \
|
||||
}
|
||||
/* Private Function Prototype */
|
||||
extern unsigned char lower_lookup_ascii[];
|
||||
#define INTL_SingleByteToLower(lower, ch) ((ch & 0x80) ? (lower[(ch & 0x7f)]) : (lower_lookup_ascii[ch]))
|
||||
MODULE_PRIVATE void INTL_DoubleByteToLower(DoubleByteToLowerMap *, unsigned char* , unsigned char* );
|
||||
|
||||
|
||||
PRIVATE void intl_strip_CRLF(unsigned char* str)
|
||||
{
|
||||
unsigned char* in;
|
||||
unsigned char* out;
|
||||
for(in = out = str; 0 != *in; in++)
|
||||
{
|
||||
if((CR != *in) && (LF != *in))
|
||||
*out++ = *in;
|
||||
}
|
||||
*out = 0;
|
||||
}
|
||||
/*
|
||||
Function intl_caseless_normalize
|
||||
This function have side effect to modify the string it got.
|
||||
It will normalize the string in a caseless matter
|
||||
*/
|
||||
PRIVATE void intl_caseless_normalize(int16 csid, unsigned char* str)
|
||||
{
|
||||
unsigned char *sb_tolowermap = INTL_GetSingleByteToLowerMap(csid);
|
||||
unsigned char *p;
|
||||
|
||||
CHECK_CSID_AND_ASSERT(csid);
|
||||
XP_ASSERT(NULL != str);
|
||||
|
||||
intl_strip_CRLF(str);
|
||||
|
||||
if(SINGLEBYTE == INTL_CharSetType(csid)) {
|
||||
/* for singlebyte csid */
|
||||
for(p = str; *p != 0 ; p++)
|
||||
*p = INTL_SingleByteToLower(sb_tolowermap, *p);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* for multibyte csid */
|
||||
DoubleByteToLowerMap *db_tolowermap = INTL_GetDoubleByteToLowerMap(csid);
|
||||
unsigned char *p;
|
||||
int l;
|
||||
for(p = str; *p != 0; p += l)
|
||||
{
|
||||
l = INTL_CharLen(csid ,p); /* *** FIX ME: IMPROVE PERFORMANCE */
|
||||
switch(l)
|
||||
{
|
||||
case 1:
|
||||
*p = INTL_SingleByteToLower(sb_tolowermap, *p);
|
||||
break;
|
||||
case 2:
|
||||
if(0 == *(p+1))
|
||||
{
|
||||
/* Check weather we hit partial characters. This happen when we use wrong csid */
|
||||
/* However, we should not pass array bondary even we use wrong csid */
|
||||
XP_ASSERT(FALSE);
|
||||
return; /* get partial characters, return */
|
||||
}
|
||||
INTL_DoubleByteToLower(db_tolowermap, p, p);
|
||||
break;
|
||||
default:
|
||||
{
|
||||
unsigned char *ck;
|
||||
/* Check weather we hit partial characters. This happen when we use wrong csid */
|
||||
/* However, we should not pass array bondary even we use wrong csid */
|
||||
for(ck = p+l-1; ck != p ;ck--)
|
||||
{
|
||||
if(0 == *ck)
|
||||
{
|
||||
XP_ASSERT(FALSE);
|
||||
return; /* get partial characters, return */
|
||||
}
|
||||
}
|
||||
/* We current do not handle 3 byte normalization. We need to work on this for UTF8 */
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
PRIVATE void INTL_DoubleByteToLower(DoubleByteToLowerMap *db_tolowermap, unsigned char* lowertext, unsigned char* text)
|
||||
{
|
||||
DoubleByteToLowerMap *p;
|
||||
for(p = db_tolowermap; !((p->src_b1 == 0) && (p->src_b2_start == 0)); p++)
|
||||
{
|
||||
if( (p->src_b1 == text[0]) &&
|
||||
(p->src_b2_start <= text[1] ) &&
|
||||
(p->src_b2_end >= text[1]) )
|
||||
{
|
||||
lowertext[0] = p->dest_b1;
|
||||
lowertext[1] = text[1] - p->src_b2_start + p->dest_b2_start;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{ /* The map have to be sorted order to implement a fast search */
|
||||
if(p->src_b1 > text[0])
|
||||
break;
|
||||
else {
|
||||
if((p->src_b1 == text[0]) && (p->src_b2_start > text[1]))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
lowertext[0] = text[0];
|
||||
lowertext[1] = text[1];
|
||||
return;
|
||||
}
|
||||
|
||||
PUBLIC XP_Bool INTL_MatchOneChar(int16 csid, unsigned char *text1,unsigned char *text2,int *charlen)
|
||||
{
|
||||
if((INTL_CharSetType(csid) == SINGLEBYTE) ) {
|
||||
unsigned char *sb_tolowermap;
|
||||
*charlen = 1;
|
||||
sb_tolowermap = INTL_GetSingleByteToLowerMap(csid);
|
||||
return( INTL_SingleByteToLower(sb_tolowermap,text1[0]) == INTL_SingleByteToLower(sb_tolowermap, text2[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
int l1, l2;
|
||||
l1 = INTL_CharLen(csid ,text1); /* *** FIX ME: IMPROVE PERFORMANCE */
|
||||
l2 = INTL_CharLen(csid ,text2); /* *** FIX ME: IMPROVE PERFORMANCE */
|
||||
if(l1 != l2)
|
||||
return FALSE;
|
||||
if(l1 == 1)
|
||||
{
|
||||
unsigned char *sb_tolowermap;
|
||||
*charlen = 1;
|
||||
sb_tolowermap = INTL_GetSingleByteToLowerMap(csid);
|
||||
return( INTL_SingleByteToLower(sb_tolowermap,text1[0]) == INTL_SingleByteToLower(sb_tolowermap, text2[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(l1 == 2)
|
||||
{
|
||||
DoubleByteToLowerMap *db_tolowermap;
|
||||
unsigned char lowertext1[2], lowertext2[2];
|
||||
*charlen = 2;
|
||||
db_tolowermap = INTL_GetDoubleByteToLowerMap(csid);
|
||||
INTL_DoubleByteToLower(db_tolowermap, lowertext1, text1);
|
||||
INTL_DoubleByteToLower(db_tolowermap, lowertext2, text2);
|
||||
return( ( lowertext1[0] == lowertext2[0] ) &&
|
||||
( lowertext1[1] == lowertext2[1] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* for character which is neither one byte nor two byte, we cannot ignore case for them */
|
||||
int i;
|
||||
*charlen = l1;
|
||||
for(i=0;i<l1;i++)
|
||||
{
|
||||
if(text1[i] != text2[i])
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
PUBLIC XP_Bool INTL_MatchOneCaseChar(int16 csid, unsigned char *text1,unsigned char *text2,int *charlen)
|
||||
{
|
||||
if((INTL_CharSetType(csid) == SINGLEBYTE) ) {
|
||||
*charlen = 1;
|
||||
return( text1[0]== text2[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
int i,len;
|
||||
*charlen = len = INTL_CharLen(csid, (unsigned char *) text1); /* *** FIX ME: IMPROVE PERFORMANCE */
|
||||
for(i=0 ; i < len; i++)
|
||||
{
|
||||
if(text1[i] != text2[i])
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
PUBLIC
|
||||
char *INTL_Strstr(int16 csid, const char *s1,const char *s2)
|
||||
{
|
||||
int len;
|
||||
char *p1, *pp1, *p2;
|
||||
if((s2==NULL) || (*s2 == '\0'))
|
||||
return (char *)s1;
|
||||
if((s1==NULL) || (*s1 == '\0'))
|
||||
return NULL;
|
||||
|
||||
for(p1=(char*)s1; *p1 ;p1 = INTL_NextChar(csid ,p1)) /* *** FIX ME: IMPROVE PERFORMANCE */
|
||||
{
|
||||
for(p2=(char*)s2, pp1=p1 ;
|
||||
((*pp1) && (*p2) && INTL_MatchOneCaseChar(csid, (unsigned char*)pp1, (unsigned char*)p2, &len));
|
||||
pp1 += len, p2 += len) /* *** FIX ME: IMPROVE PERFORMANCE */
|
||||
; /* do nothing in the loop */
|
||||
if(*p2 == '\0')
|
||||
return p1;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
To Do:
|
||||
We should take advantage of INTL_GetNormalizeStr to improve the performance of this
|
||||
*/
|
||||
PUBLIC
|
||||
char *INTL_Strcasestr(int16 csid, const char *s1, const char *s2)
|
||||
{
|
||||
int len;
|
||||
char *p1, *pp1, *p2;
|
||||
if((s2==NULL) || (*s2 == '\0'))
|
||||
return (char *)s1;
|
||||
if((s1==NULL) || (*s1 == '\0'))
|
||||
return NULL;
|
||||
|
||||
for(p1=(char*)s1; *p1 ;p1 = INTL_NextChar(csid , p1)) /* *** FIX ME: IMPROVE PERFORMANCE */
|
||||
{
|
||||
for(p2=(char*)s2, pp1=p1 ;
|
||||
((*pp1) && (*p2) && INTL_MatchOneChar(csid, (unsigned char*)pp1, (unsigned char*)p2, &len));
|
||||
pp1 += len, p2 += len) /* *** FIX ME: IMPROVE PERFORMANCE */
|
||||
; /* do nothing in the loop */
|
||||
if(*p2 == '\0')
|
||||
return p1;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PUBLIC unsigned char* INTL_GetNormalizeStr(int16 csid, unsigned char* str)
|
||||
{
|
||||
char* n_str = NULL;
|
||||
StrAllocCopy(n_str, (char*) str);
|
||||
XP_ASSERT(n_str); /* Should only come here if Memory Not Enough */
|
||||
|
||||
CHECK_CSID_AND_ASSERT(csid);
|
||||
|
||||
if(NULL != n_str)
|
||||
intl_caseless_normalize(csid, (unsigned char*)n_str);
|
||||
return (unsigned char*)n_str;
|
||||
}
|
||||
|
||||
#ifdef MOZ_MAIL_NEWS
|
||||
|
||||
PUBLIC unsigned char* INTL_GetNormalizeStrFromRFC1522(int16 csid, unsigned char* rfc1522header)
|
||||
{
|
||||
char* n_header = (char*) INTL_DecodeMimePartIIStr((char*)rfc1522header, csid, FALSE);
|
||||
if(NULL == n_header) /* INTL_DecodeMimePartIIStr() may return NULL- Mean no conversion */
|
||||
StrAllocCopy(n_header, (char*) rfc1522header);
|
||||
XP_ASSERT(n_header); /* Should only come here if Memory Not Enough */
|
||||
|
||||
CHECK_CSID_AND_ASSERT(csid);
|
||||
|
||||
if(NULL != n_header)
|
||||
intl_caseless_normalize(csid, (unsigned char*)n_header);
|
||||
return (unsigned char*)n_header;
|
||||
}
|
||||
|
||||
#endif /* MOZ_MAIL_NEWS */
|
||||
|
||||
PUBLIC XP_Bool INTL_StrContains(
|
||||
int16 strcsid, unsigned char* normalizedStr, unsigned char* normalizedSubstr)
|
||||
{
|
||||
/*
|
||||
It is the caller's responsibility to make sure the normalizedstr1 and normalizedstr2
|
||||
are normalized by calling
|
||||
INTL_GetNormalizeStr() or
|
||||
INTL_GetNormalizeStrFromRFC1522()
|
||||
*/
|
||||
char* p;
|
||||
int l_char;
|
||||
int l_idx;
|
||||
int l_substr = XP_STRLEN((char*) normalizedSubstr);
|
||||
int l_str = XP_STRLEN((char*) normalizedStr);
|
||||
|
||||
CHECK_CSID_AND_ASSERT(strcsid);
|
||||
|
||||
for(p = (char*)normalizedStr, l_idx = 0, l_char = 0; (0 != *p) && (l_idx < l_str) ; p += l_char, l_idx += l_char)
|
||||
{
|
||||
l_char = INTL_CharLen(strcsid, (unsigned char*)p); /* *** FIX ME: Should do better tune for performance here */
|
||||
if(0 == XP_STRNCMP(p, (char*) normalizedSubstr, l_substr))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
PUBLIC XP_Bool INTL_StrIs(
|
||||
int16 strcsid, unsigned char* normalizedStr, unsigned char* normalizedSubstr)
|
||||
{
|
||||
/*
|
||||
It is the caller's responsibility to make sure the normalizedstr1 and normalizedstr2
|
||||
are normalized by calling
|
||||
INTL_GetNormalizeStr() or
|
||||
INTL_GetNormalizeStrFromRFC1522()
|
||||
*/
|
||||
|
||||
CHECK_CSID_AND_ASSERT(strcsid);
|
||||
|
||||
return (0 == XP_STRCMP((char*) normalizedStr, (char*) normalizedSubstr));
|
||||
}
|
||||
PUBLIC XP_Bool INTL_StrBeginWith(
|
||||
int16 strcsid, unsigned char* normalizedStr, unsigned char* normalizedSubstr)
|
||||
{
|
||||
/*
|
||||
It is the caller's responsibility to make sure the normalizedstr1 and normalizedstr2
|
||||
are normalized by calling
|
||||
INTL_GetNormalizeStr() or
|
||||
INTL_GetNormalizeStrFromRFC1522()
|
||||
*/
|
||||
|
||||
CHECK_CSID_AND_ASSERT(strcsid);
|
||||
|
||||
return (0 == XP_STRNCMP((char*) normalizedStr, (char*) normalizedSubstr, XP_STRLEN((char*) normalizedSubstr)));
|
||||
}
|
||||
|
||||
PUBLIC XP_Bool INTL_StrEndWith(
|
||||
int16 strcsid, unsigned char* normalizedStr, unsigned char* normalizedSubstr)
|
||||
{
|
||||
/*
|
||||
It is the caller's responsibility to make sure the normalizedstr1 and normalizedstr2
|
||||
are normalized by calling
|
||||
INTL_GetNormalizeStr() or
|
||||
INTL_GetNormalizeStrFromRFC1522()
|
||||
*/
|
||||
char* p;
|
||||
int l_char;
|
||||
int l_idx;
|
||||
int l_substr = XP_STRLEN((char*) normalizedSubstr);
|
||||
int l_str = XP_STRLEN((char*) normalizedStr);
|
||||
int l_stop = l_str - l_substr;
|
||||
|
||||
CHECK_CSID_AND_ASSERT(strcsid);
|
||||
|
||||
for(p = (char*)normalizedStr, l_idx = 0, l_char = 0; (0 != *p) && (l_idx < l_stop) ; p += l_char, l_idx += l_char)
|
||||
l_char = INTL_CharLen(strcsid, (unsigned char*)p); /* *** FIX ME: Should do better tune for performance here */
|
||||
if(l_idx != l_stop)
|
||||
return FALSE;
|
||||
return (0 == XP_STRCMP(p, (char*) normalizedSubstr));
|
||||
}
|
||||
|
||||
|
||||
#ifdef MOZ_MAIL_NEWS
|
||||
|
||||
|
||||
#if defined(XP_WIN32)
|
||||
/*
|
||||
* Set locale to the system default locale.
|
||||
*/
|
||||
static char *system_default_locale_string = NULL;
|
||||
static void SetLocaleToSystemDefaultLocale(void)
|
||||
{
|
||||
char *str;
|
||||
|
||||
if (system_default_locale_string == NULL)
|
||||
{
|
||||
if (system_default_locale_string = (char *) malloc(128))
|
||||
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_SENGLANGUAGE, system_default_locale_string, 128);
|
||||
}
|
||||
str = setlocale(LC_COLLATE, system_default_locale_string);
|
||||
}
|
||||
#endif /* XP_WIN32 */
|
||||
|
||||
#if defined(XP_WIN32)
|
||||
static char *FEINTL_CreateCollationKeyUsingOS(const char *in_string, int16 wincsid)
|
||||
{
|
||||
char *out_string = NULL;
|
||||
size_t tmp_len;
|
||||
|
||||
/* Currently only supports Latin1. */
|
||||
if (wincsid != CS_ASCII && wincsid != CS_LATIN1 && wincsid != CS_DEFAULT)
|
||||
return NULL;
|
||||
|
||||
/* Prepare a larger buffer for a sort key. */
|
||||
tmp_len = XP_STRLEN(in_string)*4;
|
||||
|
||||
/* Set up the system defualt locale */
|
||||
SetLocaleToSystemDefaultLocale();
|
||||
|
||||
if (out_string = (unsigned char *) XP_ALLOC(tmp_len))
|
||||
{
|
||||
size_t rt;
|
||||
*out_string = '\0';
|
||||
rt = strxfrm(out_string, in_string, tmp_len);
|
||||
|
||||
/* Realloc the buffer if it's smaller and try again. */
|
||||
if (rt > tmp_len)
|
||||
{
|
||||
tmp_len = rt;
|
||||
if (out_string = (unsigned char *) XP_REALLOC((void *) out_string, tmp_len))
|
||||
rt = strxfrm(out_string, in_string, tmp_len);
|
||||
}
|
||||
|
||||
/* Return the output of strxfrm if success. */
|
||||
if (rt != (size_t)-1 && *out_string)
|
||||
out_string = out_string;
|
||||
else
|
||||
XP_FREEIF(out_string);
|
||||
}
|
||||
|
||||
return out_string;
|
||||
}
|
||||
#endif /* XP_WIN32 */
|
||||
#if defined(XP_MAC)
|
||||
static char *FEINTL_CreateCollationKeyUsingOS(const char *in_string, int16 wincsid)
|
||||
{
|
||||
char *out_string = NULL;
|
||||
char *temp_string;
|
||||
int in_string_len = XP_STRLEN(in_string);
|
||||
int i;
|
||||
|
||||
/* Currently only supports Latin1. */
|
||||
if (wincsid != CS_ASCII && wincsid != CS_LATIN1 && wincsid != CS_DEFAULT)
|
||||
return NULL;
|
||||
|
||||
/* INTL_ConvertLineWithoutAutoDetect may alter input string. */
|
||||
temp_string = XP_STRDUP(in_string);
|
||||
if (temp_string != NULL)
|
||||
{
|
||||
/* Convert to MacRoman. */
|
||||
out_string = (char *) INTL_ConvertLineWithoutAutoDetect (wincsid, CS_MAC_ROMAN, (unsigned char *) temp_string, in_string_len);
|
||||
/* Set the converted string if conversion was applied and the input string was not altered. */
|
||||
if (out_string != NULL && out_string != temp_string)
|
||||
{
|
||||
XP_FREE(temp_string);
|
||||
temp_string = out_string;
|
||||
}
|
||||
out_string = (char *) XP_ALLOC(in_string_len * 2 + 1);
|
||||
if (out_string != NULL)
|
||||
{
|
||||
/* Copy original string. */
|
||||
for (i = 0; i < in_string_len; i++)
|
||||
out_string[i*2+1] = temp_string[i];
|
||||
UppercaseStripDiacritics(temp_string, in_string_len, FontToScript(1));
|
||||
/* Copy uppercased string. */
|
||||
for (i = 0; i < in_string_len; i++)
|
||||
out_string[i*2] = temp_string[i];
|
||||
/* Terminate the string. */
|
||||
out_string[in_string_len * 2] = '\0';
|
||||
}
|
||||
XP_FREE(temp_string);
|
||||
}
|
||||
|
||||
return out_string;
|
||||
}
|
||||
#endif /* XP_MAC */
|
||||
#if defined(XP_UNIX)
|
||||
static char *FEINTL_CreateCollationKeyUsingOS(const char *in_string, int16 wincsid)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif /* XP_UNIX */
|
||||
|
||||
static char *INTL_CreateCollationKeyUsingOS(const char *in_string, int16 wincsid)
|
||||
{
|
||||
char *out_string;
|
||||
unsigned char *tmp;
|
||||
|
||||
/* Create a collatable string */
|
||||
if (INTL_CharSetType(wincsid) == SINGLEBYTE)
|
||||
{
|
||||
/* Front End call to create a collation key. */
|
||||
out_string = FEINTL_CreateCollationKeyUsingOS(in_string, wincsid);
|
||||
if (out_string)
|
||||
return out_string;
|
||||
|
||||
/* Otherwise just lowercase the string. */
|
||||
out_string = XP_STRDUP(in_string);
|
||||
tmp = (unsigned char *) out_string;
|
||||
while (*tmp)
|
||||
{
|
||||
*tmp = (unsigned char) XP_TO_LOWER((int)*tmp);
|
||||
tmp++;
|
||||
}
|
||||
}
|
||||
else if (wincsid & MULTIBYTE)
|
||||
{
|
||||
out_string = XP_STRDUP(in_string);
|
||||
tmp = (unsigned char *) out_string;
|
||||
while (*tmp)
|
||||
{
|
||||
/* Lower case for Ascii */
|
||||
if (*tmp < 128)
|
||||
{
|
||||
*tmp = (unsigned char) XP_TO_LOWER((int)*tmp);
|
||||
tmp++;
|
||||
}
|
||||
else
|
||||
{
|
||||
int bytes = INTL_CharLen(wincsid, tmp);
|
||||
/* ShiftJIS specific, shift hankaku kana in front of zenkaku. */
|
||||
if (wincsid == CS_SJIS)
|
||||
{
|
||||
if (*tmp >= 0xA0 && *tmp < 0xE0)
|
||||
{
|
||||
*tmp -= (0xA0 - 0x81);
|
||||
}
|
||||
else if (*tmp >= 0x81 && *tmp < 0xA0)
|
||||
{
|
||||
*tmp += (0xA0 - 0x81);
|
||||
}
|
||||
}
|
||||
tmp += bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return out_string;
|
||||
}
|
||||
|
||||
#if defined(LIBNLS_COLLATE)
|
||||
static Collation *collation = NULL;
|
||||
static char *INTL_CreateCollationKeyUsingLibNLS(const char *in_string, int16 wincsid)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif /* LIBNLS_COLLATE */
|
||||
|
||||
/*
|
||||
* Create a collation key using default system locale.
|
||||
*/
|
||||
PUBLIC char *INTL_CreateCollationKeyByDefaultLocale(const char *in_string, int16 wincsid, int32 collation_flag)
|
||||
{
|
||||
char *out_string;
|
||||
|
||||
/* For future enhancement */
|
||||
collation_flag = 0;
|
||||
|
||||
/* CS_DEFAULT is not accepted by i18n unicode converter.
|
||||
* In future, this should be taken care by the caller.
|
||||
*/
|
||||
if (CS_DEFAULT == wincsid)
|
||||
wincsid = CS_LATIN1;
|
||||
|
||||
/* Create a collation key. */
|
||||
#if defined(LIBNLS_COLLATE)
|
||||
out_string = INTL_CreateCollationKeyUsingLibNLS(in_string);
|
||||
#else
|
||||
out_string = INTL_CreateCollationKeyUsingOS(in_string, wincsid);
|
||||
#endif
|
||||
|
||||
return out_string;
|
||||
}
|
||||
|
||||
/*
|
||||
* Compare two collation keys.
|
||||
*/
|
||||
PUBLIC int INTL_Compare_CollationKey(const char *key1, const char *key2)
|
||||
{
|
||||
return XP_MEMCMP((const void *) key1, (const void *) key2, XP_STRLEN(key1));
|
||||
}
|
||||
|
||||
/*
|
||||
* Decode, convert and create a message header. Then create and return a collatable string.
|
||||
*/
|
||||
PUBLIC char *INTL_DecodeMimePartIIAndCreateCollationKey(const char *header, int16 wincsid, int32 collation_flag)
|
||||
{
|
||||
char *temp_string;
|
||||
char *decoded_string;
|
||||
char *out_string;
|
||||
|
||||
/* For future enhancement */
|
||||
collation_flag = 0;
|
||||
|
||||
/* Allocate the temp string because INTL_DecodeMimePartIIStr may alter input string. */
|
||||
temp_string = XP_STRDUP(header);
|
||||
if (temp_string == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Decode and Convert */
|
||||
decoded_string = INTL_DecodeMimePartIIStr(temp_string, wincsid, FALSE);
|
||||
|
||||
/* Free the temp string. */
|
||||
if (decoded_string != temp_string)
|
||||
XP_FREE(temp_string);
|
||||
/* No decode or conversion done, allocate for out string. */
|
||||
if (decoded_string == NULL)
|
||||
decoded_string = XP_STRDUP(header);
|
||||
if (decoded_string == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Create a collation key. */
|
||||
out_string = INTL_CreateCollationKeyByDefaultLocale(decoded_string, wincsid, collation_flag);
|
||||
|
||||
/* Return decoded string in case no collation key created. */
|
||||
if (out_string != NULL)
|
||||
XP_FREE(decoded_string);
|
||||
else
|
||||
out_string = decoded_string;
|
||||
|
||||
|
||||
return out_string;
|
||||
}
|
||||
|
||||
#endif /* MOZ_MAIL_NEWS */
|
||||
|
||||
|
||||
|
||||
@ -1,349 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* intlpriv.h */
|
||||
|
||||
#ifndef _INTLPRIV_H_
|
||||
#define _INTLPRIV_H_
|
||||
|
||||
#include "xp.h"
|
||||
#include "intl_csi.h"
|
||||
#include "libi18n.h"
|
||||
|
||||
|
||||
#define UNCVTBUF_SIZE 8 /* At least: longest ESC Seq + Char Bytes - 1 */
|
||||
#define DOC_CSID_KNOWN(x) (((x) != CS_DEFAULT) && ((x) != CS_UNKNOWN))
|
||||
|
||||
/* Some constants for UCS-2 detection */
|
||||
#define BYTE_ORDER_MARK 0xFEFF
|
||||
#define NEEDS_SWAP_MARK 0xFFFE
|
||||
|
||||
/*
|
||||
* UTF8 defines and macros
|
||||
*/
|
||||
#define ONE_OCTET_BASE 0x00 /* 0xxxxxxx */
|
||||
#define ONE_OCTET_MASK 0x7F /* x1111111 */
|
||||
#define CONTINUING_OCTET_BASE 0x80 /* 10xxxxxx */
|
||||
#define CONTINUING_OCTET_MASK 0x3F /* 00111111 */
|
||||
#define TWO_OCTET_BASE 0xC0 /* 110xxxxx */
|
||||
#define TWO_OCTET_MASK 0x1F /* 00011111 */
|
||||
#define THREE_OCTET_BASE 0xE0 /* 1110xxxx */
|
||||
#define THREE_OCTET_MASK 0x0F /* 00001111 */
|
||||
#define FOUR_OCTET_BASE 0xF0 /* 11110xxx */
|
||||
#define FOUR_OCTET_MASK 0x07 /* 00000111 */
|
||||
#define FIVE_OCTET_BASE 0xF8 /* 111110xx */
|
||||
#define FIVE_OCTET_MASK 0x03 /* 00000011 */
|
||||
#define SIX_OCTET_BASE 0xFC /* 1111110x */
|
||||
#define SIX_OCTET_MASK 0x01 /* 00000001 */
|
||||
|
||||
#define IS_UTF8_1ST_OF_1(x) (( (x)&~ONE_OCTET_MASK ) == ONE_OCTET_BASE)
|
||||
#define IS_UTF8_1ST_OF_2(x) (( (x)&~TWO_OCTET_MASK ) == TWO_OCTET_BASE)
|
||||
#define IS_UTF8_1ST_OF_3(x) (( (x)&~THREE_OCTET_MASK) == THREE_OCTET_BASE)
|
||||
#define IS_UTF8_1ST_OF_4(x) (( (x)&~FOUR_OCTET_MASK ) == FOUR_OCTET_BASE)
|
||||
#define IS_UTF8_1ST_OF_5(x) (( (x)&~FIVE_OCTET_MASK ) == FIVE_OCTET_BASE)
|
||||
#define IS_UTF8_1ST_OF_6(x) (( (x)&~SIX_OCTET_MASK ) == SIX_OCTET_BASE)
|
||||
#define IS_UTF8_2ND_THRU_6TH(x) \
|
||||
(( (x)&~CONTINUING_OCTET_MASK ) == CONTINUING_OCTET_BASE)
|
||||
#define IS_UTF8_1ST_OF_UCS2(x) \
|
||||
IS_UTF8_1ST_OF_1(x) \
|
||||
|| IS_UTF8_1ST_OF_2(x) \
|
||||
|| IS_UTF8_1ST_OF_3(x)
|
||||
|
||||
|
||||
|
||||
/* Some constants for UCS-2 detection */
|
||||
#define BYTE_ORDER_MARK 0xFEFF
|
||||
#define NEEDS_SWAP_MARK 0xFFFE
|
||||
|
||||
/* exported functions from unicvt.c */
|
||||
|
||||
MODULE_PRIVATE UNICVTAPI unsigned char *mz_ucs2utf8(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE UNICVTAPI unsigned char *mz_ucs2utf7(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE UNICVTAPI unsigned char *mz_utf82ucs(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE UNICVTAPI unsigned char *mz_utf82ucsswap(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE UNICVTAPI unsigned char *mz_utf72utf8(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE UNICVTAPI unsigned char *mz_utf82utf7(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE UNICVTAPI unsigned char *mz_imap4utf72utf8(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE UNICVTAPI unsigned char *mz_utf82imap4utf7(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE UNICVTAPI int16 utf8_to_ucs2_char(const unsigned char *utf8p, int16 buflen, uint16 *ucs2p);
|
||||
MODULE_PRIVATE UNICVTAPI int32 utf8_to_ucs2_buffer(const unsigned char *utf8p, int16 utf8len, int *parsed_cnt, int *invalid_cnt, uint16 *ucs2p, int32 ucs2len);
|
||||
|
||||
|
||||
/* values for ASCII chars */
|
||||
#define ESC 0x1B /* ESC character */
|
||||
#define NL 0x0A /* newline */
|
||||
#undef CR
|
||||
#define CR 0x0D /* carriage return */
|
||||
#define DOLLAR 0x24 /* carriage return */
|
||||
|
||||
/* values for EUC shift chars */
|
||||
#define SS2 0x8E /* Single Shift 2 */
|
||||
#define SS3 0x8F /* Single Shift 3 */
|
||||
|
||||
/* JIS encoding mode flags */
|
||||
#define JIS_Roman 0
|
||||
#define JIS_208_83 1
|
||||
#define JIS_HalfKana 2
|
||||
#define JIS_212_90 3
|
||||
|
||||
/* I am using low nibble for the ESC flag and the next high nibble for Shift */
|
||||
#define KSC_5601_87 0x04
|
||||
|
||||
/* Default state is SHIFT_OUT when we begin.
|
||||
* So SHIFT_IN should have value 0x0- */
|
||||
#define SHIFT_IN 0x00
|
||||
#define SHIFT_OUT 0x10
|
||||
|
||||
/* The actual values to be output for SHIFTING */
|
||||
#define SO 0x0e
|
||||
#define SI 0x0f
|
||||
|
||||
/* Some masks for computation */
|
||||
#define ESC_MASK 0x0F
|
||||
#define SHIFT_MASK 0xF0
|
||||
|
||||
|
||||
/*
|
||||
* Shift JIS Encoding
|
||||
* 1st Byte Range 2nd Byte Range
|
||||
* ASCII/JIS-Roman 0x21-0x7F n/a
|
||||
* 2-Byte Char(low range) 0x81-0x9F 0x40-0x7E, 0x80-0xFC
|
||||
* Half-width space(non-std) 0xA0 n/a
|
||||
* Half-width katakana 0xA1-0xDF n/a
|
||||
* 2-Byte Char(high range) 0xE0-0xEF 0x40-0x7E, 0x80-0xFC
|
||||
* User Defined(non-std) 0xF0-0xFC 0x40-0x7E, 0x80-0xFC
|
||||
*
|
||||
* JIS Encoding
|
||||
* 1st Byte Range 2nd Byte Range
|
||||
* ASCII/JIS-Roman 0x21-0x7E n/a
|
||||
* Half-width katakana(non-std) 0x21-0x5F n/a
|
||||
* 2-Byte Char 0x21-7E 0x21-7E
|
||||
*
|
||||
* Japanese EUC Encoding
|
||||
* 1st Byte Range 2nd Byte Range 3rd Byte Range
|
||||
* ASCII/JIS-Roman 0x21-0x7E n/a n/a
|
||||
* JIS X 0208-1990 0xA0-0xFF 0xA0-0xFF n/a
|
||||
* Half-width katakana SS2 0xA0-0xFF n/a
|
||||
* JIS X 0212-1990 SS3 0xA0-0xFF 0xA0-0xFF
|
||||
*
|
||||
*
|
||||
* List of ISO2022-INT Escape Sequences:
|
||||
*
|
||||
* SUPPORTED:
|
||||
* ASCII ESC ( B G0
|
||||
* JIS X 0201-Roman ESC ( J G0
|
||||
* Half-width Katakana ESC ( I
|
||||
* JIS X 0208-1978 ESC $ @ G0
|
||||
* JIS X 0208-1983 ESC $ B G0
|
||||
* JIS X 0212-1990 ESC $ ( D G0 (to EUC only)
|
||||
* ISO8859-1 ESC - A G1
|
||||
*
|
||||
* UNSUPPORTED:
|
||||
* GB 2312-80 ESC $ A G0
|
||||
* KS C 5601-1987 ESC $ ) C G1
|
||||
* CNS 11643-1986-1 ESC $ ( G G0
|
||||
* CNS 11643-1986-2 ESC $ ( H G0
|
||||
* ISO8859-7(Greek) ESC - F G1
|
||||
*
|
||||
* Added right parens: ))))) to balance editors' showmatch...
|
||||
*/
|
||||
|
||||
|
||||
/* JIS-Roman mode enabled by 3 char ESC sequence: <ESC> ( J */
|
||||
#define InsRoman_ESC(cp, obj) { \
|
||||
INTL_SetCCCJismode(obj, JIS_Roman); \
|
||||
*cp++ = ESC; \
|
||||
*cp++ = '('; \
|
||||
*cp++ = 'J'; \
|
||||
}
|
||||
/* ASCII mode enabled by 3 char ESC sequence: <ESC> ( B */
|
||||
#define InsASCII_ESC(cp, obj) { \
|
||||
INTL_SetCCCJismode(obj, JIS_Roman); \
|
||||
*cp++ = ESC; \
|
||||
*cp++ = '('; \
|
||||
*cp++ = 'B'; \
|
||||
}
|
||||
/* JIS x208-1983 mode enabled by 3 char ESC sequence: <ESC> $ B */
|
||||
#define Ins208_83_ESC(cp, obj) { \
|
||||
INTL_SetCCCJismode(obj, JIS_208_83); \
|
||||
*cp++ = ESC; \
|
||||
*cp++ = '$'; \
|
||||
*cp++ = 'B'; \
|
||||
}
|
||||
/* JIS Half-width katakana mode enabled by 3 char ESC seq.: ESC ( I */
|
||||
#define InsHalfKana_ESC(cp, obj) { \
|
||||
INTL_SetCCCJismode(obj, JIS_HalfKana); \
|
||||
*cp++ = ESC; \
|
||||
*cp++ = '('; \
|
||||
*cp++ = 'I'; \
|
||||
}
|
||||
/* JIS x212-1990 mode enabled by 4 char ESC sequence: <ESC> $ ( D */
|
||||
#define Ins212_90_ESC(cp, obj) { \
|
||||
INTL_SetCCCJismode(obj, JIS_212_90); \
|
||||
*cp++ = ESC; \
|
||||
*cp++ = '$'; \
|
||||
*cp++ = '('; \
|
||||
*cp++ = 'D'; \
|
||||
}
|
||||
|
||||
/* KSC 5601-1987 mode enabled by 4 char ESC sequence: <ESC> $ ) D */
|
||||
#define Ins5601_87_ESC(cp, obj) { \
|
||||
INTL_SetCCCJismode(obj, (INTL_GetCCCJismode(obj) & ~ESC_MASK) | KSC_5601_87); \
|
||||
*cp++ = ESC; \
|
||||
*cp++ = '$'; \
|
||||
*cp++ = ')'; \
|
||||
*cp++ = 'C'; \
|
||||
}
|
||||
#define Ins5601_87_SI(cp, obj) { \
|
||||
INTL_SetCCCJismode(obj, ((INTL_GetCCCJismode(obj) & ~SHIFT_MASK) | SHIFT_IN)); \
|
||||
*cp++ = SI; \
|
||||
}
|
||||
#define Ins5601_87_SO(cp, obj) { \
|
||||
INTL_SetCCCJismode(obj, ((INTL_GetCCCJismode(obj) & ~SHIFT_MASK) | SHIFT_OUT)); \
|
||||
*cp++ = SO; \
|
||||
}
|
||||
#define IsIns5601_87_ESC(obj) ((INTL_GetCCCJismode(obj) & ESC_MASK) == KSC_5601_87)
|
||||
#define IsIns5601_87_SI(obj) ((INTL_GetCCCJismode(obj) & SHIFT_MASK) == SHIFT_IN)
|
||||
#define IsIns5601_87_SO(obj) ((INTL_GetCCCJismode(obj) & SHIFT_MASK) == SHIFT_OUT)
|
||||
|
||||
/* Added right parens: )))))) to balance editors' showmatch... */
|
||||
|
||||
/* Maximum Length of Escape Sequence and Character Bytes per Encoding */
|
||||
#define MAX_SJIS 2
|
||||
#define MAX_EUC 3
|
||||
#define MAX_JIS 6
|
||||
|
||||
|
||||
|
||||
#define MAX_CSNAME 64
|
||||
typedef struct _csname2id_t {
|
||||
unsigned char cs_name[MAX_CSNAME];
|
||||
unsigned char java_name[MAX_CSNAME];
|
||||
int16 cs_id;
|
||||
unsigned char fill[3];
|
||||
} csname2id_t;
|
||||
|
||||
typedef struct {
|
||||
int16 from_csid; /* "from" codeset ID */
|
||||
int16 to_csid; /* "to" codeset ID */
|
||||
int16 autoselect; /* autoselectable */
|
||||
CCCFunc cvtmethod; /* char. codeset conv method */
|
||||
int32 cvtflag; /* conv func dependent flag */
|
||||
} cscvt_t;
|
||||
|
||||
|
||||
#ifdef XP_UNIX
|
||||
typedef struct {
|
||||
int16 win_csid;
|
||||
char *locale;
|
||||
char *fontlist;
|
||||
} cslocale_t;
|
||||
#endif /* XP_UNIX */
|
||||
|
||||
XP_BEGIN_PROTOS
|
||||
|
||||
MODULE_PRIVATE int net_1to1CCC(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE int net_sjis2jis(CCCDataObject,const unsigned char *s,int32 l);
|
||||
MODULE_PRIVATE int net_sjis2euc(CCCDataObject,const unsigned char *s,int32 l);
|
||||
MODULE_PRIVATE int net_euc2jis(CCCDataObject,const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE int net_euc2sjis(CCCDataObject,const unsigned char *s,int32 l);
|
||||
MODULE_PRIVATE int net_jis2other(CCCDataObject, const unsigned char *s, int32 l);
|
||||
|
||||
MODULE_PRIVATE unsigned char *mz_euc2jis(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE unsigned char *mz_sjis2euc(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE unsigned char *mz_sjis2jis(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE unsigned char *One2OneCCC(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE unsigned char *mz_euc2sjis(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE unsigned char *mz_euckr2iso(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE unsigned char *mz_iso2euckr(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE unsigned char *mz_b52cns(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE unsigned char *mz_cns2b5(CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE unsigned char *jis2other(CCCDataObject, const unsigned char *s, int32 l);
|
||||
|
||||
|
||||
MODULE_PRIVATE unsigned char *autoJCCC (CCCDataObject, const unsigned char *s, int32 l);
|
||||
MODULE_PRIVATE unsigned char *autoKCCC (CCCDataObject, const unsigned char *s, int32 l);
|
||||
|
||||
MODULE_PRIVATE int16 intl_detect_JCSID (uint16, const unsigned char *, int32);
|
||||
MODULE_PRIVATE int16 intl_detect_KCSID (uint16, const unsigned char *, int32);
|
||||
|
||||
MODULE_PRIVATE unsigned char *viet_any_2_any(CCCDataObject, const unsigned char *s, int32 l);
|
||||
|
||||
MODULE_PRIVATE unsigned char *
|
||||
mz_AnyToAnyThroughUCS2(CCCDataObject obj,const unsigned char *buf, int32 bufsz);
|
||||
|
||||
void FE_fontchange(iDocumentContext window_id, int16 csid);
|
||||
void FE_ChangeURLCharset(const char *newCharset);
|
||||
char ** FE_GetSingleByteTable(int16 from_csid, int16 to_csid, int32 resourceid);
|
||||
char * FE_LockTable(char **cvthdl);
|
||||
void FE_FreeSingleByteTable(char **cvthdl);
|
||||
|
||||
/* void CCCReportAutoDetect(CCCDataObject obj, uint16 detected_doc_csid); */
|
||||
|
||||
unsigned char *ConvHeader(unsigned char *subject);
|
||||
|
||||
#ifdef XP_UNIX
|
||||
int16 FE_WinCSID(iDocumentContext );
|
||||
#else /* XP_UNIX */
|
||||
#define FE_WinCSID(window_id) 0
|
||||
#endif /* XP_UNIX */
|
||||
|
||||
int16 *intl_GetFontCharSets(void);
|
||||
|
||||
|
||||
/**
|
||||
* Access a conversion flag for hankaku->zenkaku kana conversion for mail.
|
||||
*
|
||||
* The conversion flag for JIS, set if converting hankaku (1byte) kana to zenkaku (2byte).
|
||||
* The flag is needed in order to control the conversion. Kana conversion should be applied
|
||||
* only when sending a mail and converters do not know if they are called for mail sending.
|
||||
*
|
||||
* @param obj Character code converter.
|
||||
* @return TRUE if convert to zenkaku (2byte).
|
||||
* @see INTL_SetCCCCvtflag_SendHankakuKana
|
||||
*/
|
||||
MODULE_PRIVATE XP_Bool INTL_GetCCCCvtflag_SendHankakuKana(CCCDataObject obj);
|
||||
/**
|
||||
* Access a conversion flag for hankaku->zenkaku kana conversion for mail.
|
||||
*
|
||||
* The conversion flag for JIS, set if converting hankaku (1byte) kana to zenkaku (2byte).
|
||||
* The flag is needed in order to control the conversion. Kana conversion should be applied
|
||||
* only when sending a mail and converters do not know if they are called for mail sending.
|
||||
*
|
||||
* @param obj Character code converter.
|
||||
* @see INTL_GetCCCCvtflag_SendHankakuKana
|
||||
*/
|
||||
MODULE_PRIVATE void INTL_SetCCCCvtflag_SendHankakuKana(CCCDataObject obj, XP_Bool flag);
|
||||
|
||||
/**
|
||||
* Front end implementation for INTL_GetCharSetID.
|
||||
*
|
||||
* @param selector Specification for a charset ID to get.
|
||||
* @return Charset ID for the input selector. Returns CS_DEFUALT in case of error (e.g. selector invalid).
|
||||
* @see INTL_GetCharSetID.
|
||||
*/
|
||||
INTLCharSetID FE_GetCharSetID(INTL_CharSetID_Selector selector);
|
||||
|
||||
XP_END_PROTOS
|
||||
|
||||
|
||||
|
||||
#define MAXCSIDINTBL 128
|
||||
|
||||
|
||||
|
||||
#endif /* _INTLPRIV_H_ */
|
||||
@ -1,187 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* is2euckr.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
|
||||
extern int MK_OUT_OF_MEMORY;
|
||||
|
||||
|
||||
/* net_iso2euckr(obj, isobuf, isobufsz, uncvtbuf)
|
||||
* Args:
|
||||
* isobuf: Ptr to a buf of iso-2022-kr chars
|
||||
* isobufsz: Size in bytes of isobuf
|
||||
* jismode: Ptr to encoding mode, use as arg for next call to
|
||||
* mz_iso2euckr() for rest of current 2022-kr data. First call should
|
||||
* initialize mode to ASCII (0).
|
||||
* uncvtbuf: If entire buffer was converted, uncvtbuf[0] will be nul,
|
||||
* else this points to iso-2022-kr chars that were NOT converted
|
||||
* and mz_iso2euckr() with additional iso-2022-kr chars appended.
|
||||
* Return:
|
||||
* Returns NULL on failure, otherwise it returns a pointer to a buffer of
|
||||
* converted EUC-KR characters. Caller must XP_FREE() this memory.
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* Allocate destination buffer (for EUC-KR).
|
||||
*
|
||||
* Set mode state based upon ESC sequence and SO/SI.
|
||||
*
|
||||
* If mode is KSC 5601, set 8th bits of next 2 bytes.
|
||||
*
|
||||
* If any other mode, then assume ASCII and strip the 8th bit.
|
||||
*
|
||||
* If either 2022-kr buffer does not contain complete char or EUC-KR buffer
|
||||
* is full, then return unconverted 2022-kr to caller. Caller should
|
||||
* append more data and recall mz_iso2euckr.
|
||||
*/
|
||||
|
||||
|
||||
MODULE_PRIVATE unsigned char *
|
||||
mz_iso2euckr( CCCDataObject obj,
|
||||
const unsigned char *isobuf, /* 2022-kr buffer for conversion */
|
||||
int32 isobufsz) /* 2022-kr buffer size in bytes */
|
||||
{
|
||||
unsigned char *tobuf = NULL;
|
||||
int32 tobufsz;
|
||||
unsigned char *tobufp, *isop; /* current byte in bufs */
|
||||
unsigned char *tobufep, *isoep; /* end of buffers */
|
||||
int32 uncvtlen;
|
||||
unsigned char *uncvtbuf = INTL_GetCCCUncvtbuf(obj);
|
||||
|
||||
#define euckrbufsz tobufsz
|
||||
#define euckrbuf tobuf
|
||||
#define euckrp tobufp
|
||||
#define euckrep tobufep
|
||||
/* Allocate a dest buffer: */
|
||||
/* 2022-kr is usually longer than EUC-KR because of ESC seq.
|
||||
*
|
||||
* In the worst case (all ASCII), converted EUC-KR will be the same
|
||||
* length as the original 2022-kr + 1 for nul byte
|
||||
*/
|
||||
uncvtlen = strlen((char *)uncvtbuf);
|
||||
tobufsz = isobufsz + uncvtlen + 1;
|
||||
|
||||
if (!tobufsz) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((tobuf = (unsigned char *)XP_ALLOC(tobufsz)) == (unsigned char *)NULL) {
|
||||
INTL_SetCCCRetval(obj, MK_OUT_OF_MEMORY);
|
||||
return(NULL);
|
||||
}
|
||||
/* Initialize pointers, etc. */
|
||||
isop = (unsigned char *)isobuf;
|
||||
isoep = isop + isobufsz - 1;
|
||||
|
||||
#define uncvtp tobufp /* use tobufp as temp */
|
||||
/* If prev. unconverted chars, append unconverted
|
||||
* chars w/new chars and try to process.
|
||||
*/
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
uncvtp = uncvtbuf + uncvtlen;
|
||||
while (uncvtp < (uncvtbuf + UNCVTBUF_SIZE) &&
|
||||
isop <= isoep)
|
||||
*uncvtp++ = *isop++;
|
||||
*uncvtp = '\0'; /* nul terminate */
|
||||
isop = uncvtbuf; /* process unconverted first */
|
||||
isoep = uncvtp - 1;
|
||||
}
|
||||
#undef uncvtp
|
||||
|
||||
tobufp = tobuf;
|
||||
tobufep = tobufp + tobufsz - 2; /* save space for terminating null */
|
||||
|
||||
WHILELOOP:
|
||||
INTL_SetCCCJismode(obj, KSC_5601_87); /* jliu doesn't want to change Tony's code too much*/
|
||||
/* While 2022-kr data && space in EUC-KR buf. */
|
||||
while ((tobufp <= tobufep) && (isop <= isoep)) {
|
||||
|
||||
if( isop[0] == ESC && isoep - isop > 3 && ( isop[1] == '$' && isop[2] == ')'
|
||||
&& isop[3] == 'C' ) ){
|
||||
/* eat that ESC seq. */
|
||||
isop += 4;
|
||||
} else if (*isop == SO) {
|
||||
/* obj->jismode |= SHIFT_OUT; */
|
||||
INTL_SetCCCJismode(obj, INTL_GetCCCJismode(obj) | SHIFT_OUT);
|
||||
isop++;
|
||||
} else if (*isop == SI) {
|
||||
INTL_SetCCCJismode(obj, INTL_GetCCCJismode(obj) & (~SHIFT_OUT));
|
||||
isop++;
|
||||
} else if (INTL_GetCCCJismode(obj) == (KSC_5601_87 | SHIFT_OUT)) {
|
||||
if(*isop == 0x20) /* jliu */
|
||||
{
|
||||
*euckrp++ = *isop++ ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((isop+1) > isoep) /* Incomplete 2Byte char in JIS buf? */
|
||||
break;
|
||||
|
||||
*euckrp++ = *isop++ | 0x80;
|
||||
*euckrp++ = *isop++ | 0x80;
|
||||
}
|
||||
} else if ((0xA1 <= *isop) && (*isop <= 0xFE)) {
|
||||
/* Somehow we hit EUC_KR data, let it through */
|
||||
if ((isop+1) > isoep) /* Incomplete 2Byte char in JIS buf? */
|
||||
break;
|
||||
*euckrp++ = *isop++ ;
|
||||
*euckrp++ = *isop++ ;
|
||||
} else {
|
||||
/* Unknown type: no conversion */
|
||||
*euckrp++ = *isop++ & 0x7f;
|
||||
}
|
||||
}
|
||||
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
/* Just processed unconverted chars:
|
||||
* isop pts to 1st unprocessed char in
|
||||
* isobuf. Some may have been processed
|
||||
* while processing unconverted chars,
|
||||
* so set up ptrs not to process them
|
||||
* twice.
|
||||
*/
|
||||
/* If nothing was converted, this can
|
||||
* only happen if there was not
|
||||
* enough 2022-kr data. Stop and get
|
||||
* more data.
|
||||
*/
|
||||
if (isop == uncvtbuf) { /* Nothing converted */
|
||||
*tobufp = '\0';
|
||||
return(NULL);
|
||||
}
|
||||
isoep = (unsigned char *)isobuf + isobufsz - 1 ;
|
||||
isop = (unsigned char *)isobuf + (isop - uncvtbuf - uncvtlen);
|
||||
uncvtbuf[0] = '\0'; /* No more uncoverted chars. */
|
||||
goto WHILELOOP; /* Process new data */
|
||||
}
|
||||
|
||||
*tobufp = '\0'; /* null terminate dest. data */
|
||||
INTL_SetCCCLen(obj, tobufp - tobuf); /* length not counting null */
|
||||
|
||||
if (isop <= isoep) { /* unconverted 2022-kr? */
|
||||
tobufp = uncvtbuf; /* reuse the tobufp as a TEMP */
|
||||
while (isop <= isoep)
|
||||
*tobufp++ = *isop++;
|
||||
*tobufp = '\0'; /* null terminate */
|
||||
}
|
||||
return(tobuf);
|
||||
}
|
||||
|
||||
|
||||
@ -1,293 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* jis2oth.c */
|
||||
/* other: SJIS or EUC */
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
|
||||
extern int MK_OUT_OF_MEMORY;
|
||||
|
||||
|
||||
/* net_jis2other(obj, jisbuf, jisbufsz, uncvtbuf)
|
||||
* Args:
|
||||
* jisbuf: Ptr to a buf of JIS chars
|
||||
* jisbufsz: Size in bytes of jisbuf
|
||||
* jismode: Ptr to encoding mode, use as arg for next call to
|
||||
* jis2other() for rest of current SJIS data. First call should
|
||||
* initialize mode to ASCII (0).
|
||||
* uncvtbuf: If entire buffer was converted, uncvtbuf[0] will be nul,
|
||||
* else this points to SJIS chars that were NOT converted
|
||||
* and jis2other() with additional SJIS chars appended.
|
||||
* obj->cvtflag: Specifies converting to either EUC or SJIS.
|
||||
* Return:
|
||||
* Returns NULL on failure, otherwise it returns a pointer to a buffer of
|
||||
* converted JIS characters. Caller must XP_FREE() this memory.
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* Allocate destination buffer (for SJIS or EUC).
|
||||
*
|
||||
* Set JIS mode state based upon ESC sequences. Also if NL or CR,
|
||||
* mode is reset to JIS-Roman.
|
||||
*
|
||||
* If JIS mode is JIS x208 and converting to EUC, set 8th bits of next 2 bytes.
|
||||
*
|
||||
* If JIS mode is JIS x208-1983 and converting to SJIS, use the
|
||||
* JIS to SJIS algorithm.
|
||||
*
|
||||
* If JIS mode is JIS x212 and converting to EUC, output SS3 and set 8th
|
||||
* bits of next 2 bytes. (This mode only set when converting to EUC.)
|
||||
*
|
||||
* If JIS Half-width Katakana and converting to EUC, output SS2 followed
|
||||
* by the 2 bytes w/8th bits set.
|
||||
*
|
||||
* If JIS Half-width Katakana and converting to SJIS, output the 2 bytes
|
||||
* w/8th bits set.
|
||||
*
|
||||
* If any other JIS mode, then assume Latin1 and just copy the next byte.
|
||||
*
|
||||
* If either SJIS buffer does not contain complete JIS char or JIS buffer
|
||||
* is full, then return unconverted SJIS to caller. Caller should
|
||||
* append more data and recall jis2other.
|
||||
*/
|
||||
|
||||
|
||||
MODULE_PRIVATE unsigned char *
|
||||
jis2other( CCCDataObject obj,
|
||||
const unsigned char *jisbuf, /* JIS buffer for conversion*/
|
||||
int32 jisbufsz) /* JIS buffer size in bytes */
|
||||
{
|
||||
unsigned char *tobuf = NULL;
|
||||
int32 tobufsz;
|
||||
unsigned char *tobufp, *jisp; /* current byte in bufs */
|
||||
unsigned char *tobufep, *jisep; /* end of buffers */
|
||||
int32 uncvtlen;
|
||||
unsigned char *uncvtbuf = INTL_GetCCCUncvtbuf(obj);
|
||||
|
||||
#define sjisbuf tobuf
|
||||
#define sjisbufsz tobufsz
|
||||
#define sjisp tobufp
|
||||
#define sjisep tobufep
|
||||
|
||||
#define eucbufsz tobufsz
|
||||
#define eucbuf tobuf
|
||||
#define eucp tobufp
|
||||
#define eucep tobufep
|
||||
/* Allocate a dest buffer: */
|
||||
/* JIS is usually longer than SJIS or EUC because of ESC seq.
|
||||
*
|
||||
* In the worst case (all Roman), converted SJIS will be the same
|
||||
* length as the original JIS + 1 for nul byte
|
||||
*
|
||||
* In the worst case ( <ESC> ( I <rest Half-width Kana>... ),
|
||||
* converted EUC will be 2X - 2 the size of the original JIS + 1 for nul
|
||||
* byte.
|
||||
*/
|
||||
uncvtlen = strlen((char *)uncvtbuf);
|
||||
if (!INTL_GetCCCCvtflag(obj))
|
||||
tobufsz = jisbufsz + uncvtlen + 1;
|
||||
else
|
||||
tobufsz = (jisbufsz + uncvtlen) << 1;
|
||||
|
||||
if (!tobufsz) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((tobuf = (unsigned char *)XP_ALLOC(tobufsz)) == (unsigned char *)NULL) {
|
||||
INTL_SetCCCRetval(obj, MK_OUT_OF_MEMORY);
|
||||
return(NULL);
|
||||
}
|
||||
/* Initialize pointers, etc. */
|
||||
jisp = (unsigned char *)jisbuf;
|
||||
jisep = jisp + jisbufsz - 1;
|
||||
|
||||
#define uncvtp tobufp /* use tobufp as temp */
|
||||
/* If prev. unconverted chars, append unconverted
|
||||
* chars w/new chars and try to process.
|
||||
*/
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
uncvtp = uncvtbuf + uncvtlen;
|
||||
while (uncvtp < (uncvtbuf + UNCVTBUF_SIZE) &&
|
||||
jisp <= jisep)
|
||||
*uncvtp++ = *jisp++;
|
||||
*uncvtp = '\0'; /* nul terminate */
|
||||
jisp = uncvtbuf; /* process unconverted first */
|
||||
jisep = uncvtp - 1;
|
||||
}
|
||||
#undef uncvtp
|
||||
|
||||
tobufp = tobuf;
|
||||
tobufep = tobufp + tobufsz - 2; /* save space for terminating null */
|
||||
|
||||
WHILELOOP:
|
||||
/* While JIS data && space in SJIS buf. */
|
||||
while ((tobufp <= tobufep) && (jisp <= jisep)) {
|
||||
if (*jisp == ESC) {
|
||||
if ((jisep - jisp) < 2) /* Incomplete ESC seq in JIS buf? */
|
||||
break;
|
||||
switch (jisp[1]) {
|
||||
case '(':
|
||||
switch (jisp[2]) {
|
||||
case 'J': /* JIS X 0201-Roman */
|
||||
case 'B': /* ASCII */
|
||||
INTL_SetCCCJismode(obj, JIS_Roman);
|
||||
jisp += 3; /* remove ESC seq. */
|
||||
break;
|
||||
case 'I': /* Half-width katakana */
|
||||
INTL_SetCCCJismode(obj, JIS_HalfKana);
|
||||
jisp += 3; /* remove ESC seq. */
|
||||
break;
|
||||
default: /* pass thru invalid ESC seq. */
|
||||
*tobufp++ = *jisp++;
|
||||
*tobufp++ = *jisp++;
|
||||
}
|
||||
break;
|
||||
case DOLLAR:
|
||||
switch (jisp[2]) {
|
||||
case 'B': /* JIS X 0208-1983 */
|
||||
case '@': /* JIS X 0208-1978 (old-JIS) */
|
||||
INTL_SetCCCJismode(obj, JIS_208_83);
|
||||
jisp += 3; /* remove rest of ESC seq. */
|
||||
break;
|
||||
case '(':
|
||||
if ((jisep - jisp) < 3) /* Full ESC seq in buf? */
|
||||
goto abortwhile;
|
||||
switch (jisp[3]) {
|
||||
case 'D': /* JIS X 0212-1990 */
|
||||
if (!INTL_GetCCCCvtflag(obj)) /* No JIS212 in SJIS */
|
||||
INTL_SetCCCJismode(obj, JIS_208_83);
|
||||
else
|
||||
INTL_SetCCCJismode(obj, JIS_212_90);
|
||||
jisp += 4; /* remove rest of ESC seq. */
|
||||
break;
|
||||
default: /* pass thru invalid ESC seq. */
|
||||
*tobufp++ = *jisp++;
|
||||
*tobufp++ = *jisp++;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default: /* pass thru invalid ESC seq. */
|
||||
*tobufp++ = *jisp++;
|
||||
*tobufp++ = *jisp++;
|
||||
}
|
||||
break;
|
||||
case '-':
|
||||
switch (jisp[2]) {
|
||||
case 'A': /* ISO8859-1 */
|
||||
INTL_SetCCCJismode(obj, JIS_Roman);
|
||||
jisp += 3; /* remove rest of ESC seq. */
|
||||
break;
|
||||
default: /* pass thru invalid ESC seq. */
|
||||
*tobufp++ = *jisp++;
|
||||
*tobufp++ = *jisp++;
|
||||
}
|
||||
break;
|
||||
default: /* pass thru invalid ESC seq. */
|
||||
*tobufp++ = *jisp++;
|
||||
}
|
||||
} else if (*jisp == NL || *jisp == CR) {
|
||||
INTL_SetCCCJismode(obj, JIS_Roman);
|
||||
*tobufp++ = *jisp++;
|
||||
} else if (INTL_GetCCCJismode(obj) == JIS_208_83) {
|
||||
if ((jisp+1) > jisep) /* Incomplete 2Byte char in JIS buf? */
|
||||
break;
|
||||
|
||||
if (INTL_GetCCCCvtflag(obj)) { /* Convert JIS 208 to EUC */
|
||||
*eucp++ = *jisp | 0x80;
|
||||
jisp++;
|
||||
*eucp++ = *jisp | 0x80;
|
||||
jisp++;
|
||||
|
||||
} else { /* Convert JIS-208 to SJIS: Same as */
|
||||
/* euc2sjis.c's EUC208-to-SJIS algorithm */
|
||||
/* except JIS 8th bit is clear. */
|
||||
if (*jisp < 0x5F) /* Convert 1st SJIS byte */
|
||||
*sjisp++ = ((*jisp + 1) >> 1) + 0x70;
|
||||
else
|
||||
*sjisp++ = ((*jisp + 1) >> 1) + 0xB0;
|
||||
/* Convert 2nd SJIS byte */
|
||||
|
||||
if ((*jisp++) & 1) { /* if 1st JIS byte is odd */
|
||||
if (*jisp > 0x5F)
|
||||
*sjisp = *jisp + 0x20;
|
||||
else
|
||||
*sjisp = *jisp + 0x1F;
|
||||
} else {
|
||||
*sjisp = *jisp + 0x7E;
|
||||
}
|
||||
sjisp++;
|
||||
jisp++;
|
||||
}
|
||||
} else if (INTL_GetCCCJismode(obj) == JIS_212_90) {
|
||||
/* only "to EUC" supports 212 */
|
||||
if ((jisp+1) > jisep) /* Incomplete 2Byte char in JIS buf? */
|
||||
break;
|
||||
*eucp++ = SS3;
|
||||
*eucp++ = *jisp | 0x80;
|
||||
jisp++;
|
||||
*eucp++ = *jisp | 0x80;
|
||||
jisp++;
|
||||
} else if (INTL_GetCCCJismode(obj) == JIS_HalfKana) {
|
||||
if (INTL_GetCCCCvtflag(obj)) {
|
||||
*eucp++ = SS2;
|
||||
}
|
||||
*tobufp++ = *jisp | 0x80; /* Set 8th bit for EUC & SJIS */
|
||||
jisp++;
|
||||
} else {
|
||||
/* Unknown type: no conversion */
|
||||
*tobufp++ = *jisp++;
|
||||
}
|
||||
}
|
||||
abortwhile:
|
||||
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
/* Just processed unconverted chars:
|
||||
* jisp pts to 1st unprocessed char in
|
||||
* jisbuf. Some may have been processed
|
||||
* while processing unconverted chars,
|
||||
* so set up ptrs not to process them
|
||||
* twice.
|
||||
*/
|
||||
/* If nothing was converted, this can
|
||||
* only happen if there was not
|
||||
* enough JIS data. Stop and get
|
||||
* more data.
|
||||
*/
|
||||
if (jisp == uncvtbuf) { /* Nothing converted */
|
||||
*tobufp = '\0';
|
||||
return(NULL);
|
||||
}
|
||||
jisep = (unsigned char *)jisbuf + jisbufsz - 1 ;
|
||||
jisp = (unsigned char *)jisbuf + (jisp - uncvtbuf - uncvtlen);
|
||||
uncvtbuf[0] = '\0'; /* No more uncoverted chars. */
|
||||
goto WHILELOOP; /* Process new data */
|
||||
}
|
||||
|
||||
*tobufp = '\0'; /* null terminate dest. data */
|
||||
INTL_SetCCCLen(obj, tobufp - tobuf); /* length not counting null */
|
||||
|
||||
if (jisp <= jisep) { /* uncoverted JIS? */
|
||||
tobufp = uncvtbuf; /* reuse the tobufp as a TEMP */
|
||||
while (jisp <= jisep)
|
||||
*tobufp++ = *jisp++;
|
||||
*tobufp = '\0'; /* null terminate */
|
||||
}
|
||||
return(tobuf);
|
||||
}
|
||||
|
||||
@ -1,156 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
* katakana.c
|
||||
*
|
||||
* Half- to Full-width Katakana Conversion for SJIS and EUC.
|
||||
* based on the book of Ken Lunde
|
||||
* (Understanding Japanese Information Processing, Published by O'Reilly; 09/1993; ISBN: 1565920430).
|
||||
*/
|
||||
|
||||
|
||||
#if defined(MOZ_MAIL_NEWS)
|
||||
|
||||
#include "intlpriv.h"
|
||||
#include "prefapi.h"
|
||||
#include "katakana.h"
|
||||
|
||||
#define ISMARU(A) (A >= 202 && A <= 206)
|
||||
#define ISNIGORI(A) ((A >= 182 && A <= 196) || (A >= 202 && A <= 206) || (A == 179))
|
||||
#define HANKATA(c) (c >= 161 && c <= 223) /* 0xa1 - 0xdf */
|
||||
|
||||
/* pref related prototype and variables */
|
||||
PUBLIC int PR_CALLBACK intl_SetSendHankakuKana(const char * newpref, void * data);
|
||||
|
||||
static XP_Bool pref_callback_installed = FALSE;
|
||||
static XP_Bool send_hankaku_kana = FALSE;
|
||||
static const char *pref_send_hankaku_kana = "mailnews.send_hankaku_kana";
|
||||
|
||||
|
||||
static void han2zen(XP_Bool insjis, unsigned char *inbuf, uint32 inlen,
|
||||
unsigned char *outbuf, XP_Bool *composite)
|
||||
{
|
||||
unsigned char c1 = *inbuf++;
|
||||
unsigned char c2;
|
||||
unsigned char tmp = c1;
|
||||
unsigned char junk;
|
||||
XP_Bool maru = FALSE;
|
||||
XP_Bool nigori = FALSE;
|
||||
unsigned char mtable[][2] = {
|
||||
{129,66},{129,117},{129,118},{129,65},{129,69},{131,146},{131,64},
|
||||
{131,66},{131,68},{131,70},{131,72},{131,131},{131,133},{131,135},
|
||||
{131,98},{129,91},{131,65},{131,67},{131,69},{131,71},{131,73},
|
||||
{131,74},{131,76},{131,78},{131,80},{131,82},{131,84},{131,86},
|
||||
{131,88},{131,90},{131,92},{131,94},{131,96},{131,99},{131,101},
|
||||
{131,103},{131,105},{131,106},{131,107},{131,108},{131,109},
|
||||
{131,110},{131,113},{131,116},{131,119},{131,122},{131,125},
|
||||
{131,126},{131,128},{131,129},{131,130},{131,132},{131,134},
|
||||
{131,136},{131,137},{131,138},{131,139},{131,140},{131,141},
|
||||
{131,143},{131,147},{131,74},{129,75}
|
||||
};
|
||||
|
||||
if (inlen > 1)
|
||||
{
|
||||
if (insjis)
|
||||
{
|
||||
c2 = *inbuf;
|
||||
if (c2 == 222 && ISNIGORI(c1))
|
||||
nigori = TRUE;
|
||||
if (c2 == 223 && ISMARU(c1))
|
||||
maru = TRUE;
|
||||
}
|
||||
else /* EUC */
|
||||
{
|
||||
junk = *inbuf++;
|
||||
c2 = *inbuf;
|
||||
if (junk == SS2) /* If the variable junk is SS2, we have another half-
|
||||
width katakana. */
|
||||
{
|
||||
if (c2 == 222 && ISNIGORI(c1))
|
||||
nigori = TRUE;
|
||||
if (c2 == 223 && ISMARU(c1))
|
||||
maru = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (HANKATA(tmp)) /* Check to see if tmp is in half-width katakana range. */
|
||||
{
|
||||
c1 = mtable[tmp - 161][0]; /* Calculate first byte using mapping table */
|
||||
c2 = mtable[tmp - 161][1]; /* Calculate second byte using mapping table */
|
||||
}
|
||||
if (nigori)
|
||||
{
|
||||
if ((c2 >= 74 && c2 <= 103) || (c2 >= 110 && c2 <= 122))
|
||||
c2++;
|
||||
else if (c1 == 131 && c2 == 69)
|
||||
c2 = 148;
|
||||
}
|
||||
else if (maru && c2 >= 110 && c2 <= 122)
|
||||
c2 += 2;
|
||||
|
||||
*outbuf++ = c1;
|
||||
*outbuf = c2;
|
||||
*composite = maru || nigori;
|
||||
}
|
||||
|
||||
/*
|
||||
* Half to full Katakana conversion for SJIS. Caller need to allocate outbuf (x2 of inbuf).
|
||||
*/
|
||||
MODULE_PRIVATE void INTL_SjisHalf2FullKana(unsigned char *inbuf, uint32 inlen, unsigned char *outbuf, uint32 *byteused)
|
||||
{
|
||||
XP_Bool composite;
|
||||
|
||||
han2zen(TRUE, inbuf, inlen, outbuf, &composite);
|
||||
*byteused = composite ? 2 : 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Half to full Katakana conversion for EUC. Caller need to allocate outbuf (x3 of inbuf).
|
||||
*/
|
||||
MODULE_PRIVATE void INTL_EucHalf2FullKana(unsigned char *inbuf, uint32 inlen, unsigned char *outbuf, uint32 *byteused)
|
||||
{
|
||||
XP_Bool composite;
|
||||
|
||||
han2zen(FALSE, inbuf, inlen, outbuf, &composite);
|
||||
*byteused = composite ? 3 : 1; /* 2 chars plus SS2 or 1 char */
|
||||
}
|
||||
|
||||
/* callback routine invoked by prefapi when the pref value changes */
|
||||
PUBLIC int PR_CALLBACK intl_SetSendHankakuKana(const char * newpref, void * data)
|
||||
{
|
||||
return PREF_GetBoolPref(pref_send_hankaku_kana, &send_hankaku_kana);
|
||||
}
|
||||
|
||||
MODULE_PRIVATE XP_Bool INTL_GetSendHankakuKana()
|
||||
{
|
||||
if (!pref_callback_installed)
|
||||
{
|
||||
PREF_GetBoolPref(pref_send_hankaku_kana, &send_hankaku_kana);
|
||||
PREF_RegisterCallback(pref_send_hankaku_kana, intl_SetSendHankakuKana, NULL);
|
||||
pref_callback_installed = TRUE;
|
||||
}
|
||||
|
||||
return send_hankaku_kana;
|
||||
}
|
||||
|
||||
#else
|
||||
#ifdef OSF1
|
||||
static int dumbcc = 0; /* The 3.2 compiler aborts when there's "nothing to compile", and 4.0 warns. This fixes both problems. */
|
||||
#endif
|
||||
#endif /* MOZ_MAIL_NEWS */
|
||||
@ -1,28 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
/* katakana.h */
|
||||
|
||||
#ifndef KATAKANA_H
|
||||
#define KATAKANA_H
|
||||
|
||||
MODULE_PRIVATE void INTL_SjisHalf2FullKana(unsigned char *inbuf, uint32 inlen, unsigned char *outbuf, uint32 *byteused);
|
||||
MODULE_PRIVATE void INTL_EucHalf2FullKana(unsigned char *inbuf, uint32 inlen, unsigned char *outbuf, uint32 *byteused);
|
||||
MODULE_PRIVATE XP_Bool INTL_GetSendHankakuKana(void);
|
||||
|
||||
#endif /* KATAKANA_H */
|
||||
@ -1,217 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* kinsokud.c */
|
||||
|
||||
/*
|
||||
Japanese Kinsoku table:
|
||||
Characters are not allowed in the beginning of line
|
||||
*/
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
MODULE_PRIVATE const char *ProhibitBegin_SJIS[] =
|
||||
{
|
||||
"\x21", "\x25", "\x29", "\x2C", "\x2E", "\x3A", "\x3B", "\x3F", "\x5D", "\x7D",
|
||||
"\xA1", "\xA3", "\xA4", "\xA5", "\xDE", "\xDF", "\x81\x41", "\x81\x42", "\x81\x43", "\x81\x44",
|
||||
"\x81\x45", "\x81\x46", "\x81\x47", "\x81\x48", "\x81\x49", "\x81\x4A", "\x81\x4B", "\x81\x52", "\x81\x53", "\x81\x54",
|
||||
"\x81\x55", "\x81\x58", "\x81\x66", "\x81\x68", "\x81\x6A", "\x81\x6C", "\x81\x6E", "\x81\x70", "\x81\x72", "\x81\x74",
|
||||
"\x81\x76", "\x81\x78", "\x81\x7A", "\x81\x8B", "\x81\x8C", "\x81\x8D", "\x81\x8E", "\x81\x91", "\x81\x93", "\x81\xF1",
|
||||
"\0"
|
||||
};
|
||||
MODULE_PRIVATE const char *ProhibitBegin_EUCJP[] =
|
||||
{
|
||||
"\x21", "\x25", "\x29", "\x2C", "\x2E", "\x3A", "\x3B", "\x3F", "\x5D", "\x7D",
|
||||
"\x8E\xA1", "\x8E\xA3", "\x8E\xA4", "\x8E\xA5", "\x8E\xDE", "\x8E\xDF", "\xA1\xA2", "\xA1\xA3", "\xA1\xA4", "\xA1\xA5",
|
||||
"\xA1\xA6", "\xA1\xA7", "\xA1\xA8", "\xA1\xA9", "\xA1\xAA", "\xA1\xAB", "\xA1\xAC", "\xA1\xB3", "\xA1\xB4", "\xA1\xB5",
|
||||
"\xA1\xB6", "\xA1\xB9", "\xA1\xC7", "\xA1\xC9", "\xA1\xCB", "\xA1\xCD", "\xA1\xCF", "\xA1\xD1", "\xA1\xD3", "\xA1\xD5",
|
||||
"\xA1\xD7", "\xA1\xD9", "\xA1\xDB", "\xA1\xEB", "\xA1\xEC", "\xA1\xED", "\xA1\xEE", "\xA1\xF1", "\xA1\xF3", "\xA2\xF3",
|
||||
"\0"
|
||||
};
|
||||
|
||||
/*
|
||||
* BIG5 table
|
||||
*/
|
||||
MODULE_PRIVATE const char *ProhibitBegin_BIG5[] =
|
||||
{
|
||||
"\x21", "\x29", "\x2C", "\x2E", "\x3A", "\x3B", "\x3F", "\x5D", "\x7D", "\xA1\x41",
|
||||
"\xA1\x43", "\xA1\x44", "\xA1\x45", "\xA1\x46", "\xA1\x47", "\xA1\x48", "\xA1\x49", "\xA1\x4A", "\xA1\x4B", "\xA1\x4C",
|
||||
"\xA1\x4D", "\xA1\x4E", "\xA1\x50", "\xA1\x51", "\xA1\x52", "\xA1\x53", "\xA1\x54", "\xA1\x55", "\xA1\x56", "\xA1\x57",
|
||||
"\xA1\x58", "\xA1\x59", "\xA1\x5A", "\xA1\x5B", "\xA1\x5C", "\xA1\x5E", "\xA1\x60", "\xA1\x62", "\xA1\x64", "\xA1\x66",
|
||||
"\xA1\x68", "\xA1\x6A", "\xA1\x6C", "\xA1\x6E", "\xA1\x70", "\xA1\x72", "\xA1\x74", "\xA1\x76", "\xA1\x78", "\xA1\x7A",
|
||||
"\xA1\x7C", "\xA1\x7E", "\xA1\xA2", "\xA1\xA4", "\xA1\xA6", "\xA1\xA8", "\xA1\xAA", "\xA1\xAC", "\0"
|
||||
};
|
||||
/*
|
||||
Convert the table from BIG5 into CNS_8BIT
|
||||
*/
|
||||
MODULE_PRIVATE const char *ProhibitBegin_CNS[] =
|
||||
{
|
||||
"\x21", "\x29", "\x2C", "\x2E", "\x3A", "\x3B", "\x3F", "\x5D", "\x7D", "\xA1\xA2",
|
||||
"\xA1\xA4", "\xA1\xA5", "\xA1\xA6", "\xA1\xA7", "\xA1\xA8", "\xA1\xA9", "\xA1\xAA", "\xA1\x4B", "\xA1\x4B", "\xA1\xAC",
|
||||
"\xA1\xAC", "\xA1\xAD", "\xA1\xB1", "\xA1\xB2", "\xA1\xB3", "\xA1\xB4", "\xA1\xB5", "\xA1\xB6", "\xA1\xB7", "\xA1\xB8",
|
||||
"\xA1\xB9", "\xA1\xBA", "\xA1\xBB", "\xA1\xBC", "\xA1\xBD", "\xA1\xBF", "\xA1\xC1", "\xA1\xC2", "\xA1\x64", "\xA1\x66",
|
||||
"\xA1\xC9", "\xA1\xCB", "\xA1\xCD", "\xA1\xCF", "\xA1\xD1", "\xA1\xD3", "\xA1\xD5", "\xA1\xD7", "\xA1\xDA", "\xA1\xDB",
|
||||
"\xA1\xDD", "\xA1\xDF", "\xA1\xE1", "\xA1\xE3", "\xA1\xE5", "\xA1\xE7", "\xA1\xE9", "\xA1\xEB", "\0"
|
||||
};
|
||||
|
||||
MODULE_PRIVATE const char *ProhibitBegin_GB[] =
|
||||
{
|
||||
"\x21", "\x29", "\x2C", "\x2E", "\x3A", "\x3B", "\x3F", "\x5D", "\x7D", "\xA1\xA2",
|
||||
"\xA1\xA3", "\xA1\xA4", "\xA1\xA5", "\xA1\xA6", "\xA1\xA7", "\xA1\xA8", "\xA1\xA9", "\xA1\xAA", "\xA1\xAB", "\xA1\xAC",
|
||||
"\xA1\xAD", "\xA1\xAF", "\xA1\xB1", "\xA1\xB3", "\xA1\xB5", "\xA1\xB7", "\xA1\xB9", "\xA1\xBB", "\xA1\xBD", "\xA1\xBF",
|
||||
"\xA1\xC3", "\xA3\xA1", "\xA3\xA2", "\xA3\xA7", "\xA3\xA9", "\xA3\xAC", "\xA3\xAE", "\xA3\xBA", "\xA3\xBB", "\xA3\xBF",
|
||||
"\xA3\xDD", "\xA3\xE0", "\xA3\xFC", "\xA3\xFD", "\0"
|
||||
};
|
||||
|
||||
MODULE_PRIVATE const char *ProhibitBegin_KSC[] =
|
||||
{
|
||||
"\x21", "\x25", "\x29", "\x2C", "\x2E", "\x3A", "\x3B", "\x3F", "\x5D", "\x7D",
|
||||
"\xA1\xA2", "\xA1\xAF", "\xA1\xB1", "\xA1\xB3", "\xA1\xB5", "\xA1\xB7", "\xA1\xB9", "\xA1\xBB", "\xA1\xBD", "\xA1\xC6",
|
||||
"\xA1\xC7", "\xA1\xC8", "\xA1\xC9", "\xA1\xCB", "\xA3\xA1", "\xA3\xA5", "\xA3\xA9", "\xA3\xAC", "\xA3\xAE", "\xA3\xBA",
|
||||
"\xA3\xBB", "\xA3\xBF", "\xA3\xDC", "\xA3\xDD", "\xA3\xFD", "\0"
|
||||
};
|
||||
|
||||
|
||||
/* ProhibitBegin_UTF8: Made by ftang. */
|
||||
MODULE_PRIVATE const char *ProhibitBegin_UTF8[] =
|
||||
{
|
||||
/* U+ 21 */ "\x21",
|
||||
/* U+ 25 */ "\x25",
|
||||
/* U+ 29 */ "\x29",
|
||||
/* U+ 2C */ "\x2C",
|
||||
/* U+ 2E */ "\x2E",
|
||||
/* U+ 3A */ "\x3A",
|
||||
/* U+ 3B */ "\x3B",
|
||||
/* U+ 5D */ "\x5D",
|
||||
/* U+ 7D */ "\x7D",
|
||||
/* U+ 3F */ "\x3F",
|
||||
/* U+ A2 */ "\xC2\xA2",
|
||||
/* U+ BB */ "\xC2\xBB",
|
||||
/* U+2019 */ "\xE2\x80\x99",
|
||||
/* U+201D */ "\xE2\x80\x9D",
|
||||
/* U+2024 */ "\xE2\x80\xA4",
|
||||
/* U+2025 */ "\xE2\x80\xA5",
|
||||
/* U+2026 */ "\xE2\x80\xA6",
|
||||
/* U+2030 */ "\xE2\x80\xB0",
|
||||
/* U+3001 */ "\xE3\x80\x81",
|
||||
/* U+3002 */ "\xE3\x80\x82",
|
||||
/* U+3005 */ "\xE3\x80\x85",
|
||||
/* U+3009 */ "\xE3\x80\x89",
|
||||
/* U+300B */ "\xE3\x80\x8B",
|
||||
/* U+300D */ "\xE3\x80\x8D",
|
||||
/* U+300F */ "\xE3\x80\x8F",
|
||||
/* U+3011 */ "\xE3\x80\x91",
|
||||
/* U+3015 */ "\xE3\x80\x95",
|
||||
/* U+3017 */ "\xE3\x80\x97",
|
||||
/* U+3019 */ "\xE3\x80\x99",
|
||||
/* U+301B */ "\xE3\x80\x9B",
|
||||
/* U+3099 */ "\xE3\x82\x99",
|
||||
/* U+309A */ "\xE3\x82\x9A",
|
||||
/* U+309B */ "\xE3\x82\x9B",
|
||||
/* U+309C */ "\xE3\x82\x9C",
|
||||
/* U+309D */ "\xE3\x82\x9D",
|
||||
/* U+309E */ "\xE3\x82\x9E",
|
||||
/* U+30FB */ "\xE3\x83\xBB",
|
||||
/* U+30FC */ "\xE3\x83\xBC",
|
||||
/* U+30FD */ "\xE3\x83\xBD",
|
||||
/* U+30FE */ "\xE3\x83\xBE",
|
||||
/* U+FF61 */ "\xEF\xBD\xA1",
|
||||
/* U+FF63 */ "\xEF\xBD\xA3",
|
||||
/* U+FF64 */ "\xEF\xBD\xA4",
|
||||
/* U+FF65 */ "\xEF\xBD\xA5",
|
||||
/* U+FF9E */ "\xEF\xBE\x9E",
|
||||
/* U+FF9F */ "\xEF\xBE\x9F",
|
||||
"\0"
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Japanese Kinsoku table:
|
||||
Characters are not allowed in the end of line
|
||||
*/
|
||||
|
||||
MODULE_PRIVATE const char *ProhibitEnd_SJIS[] =
|
||||
{
|
||||
"\x24", "\x28", "\x5B", "\x5C", "\x7B", "\xA2", "\x81\x65", "\x81\x67", "\x81\x69", "\x81\x6B",
|
||||
"\x81\x6D", "\x81\x6F", "\x81\x71", "\x81\x73", "\x81\x75", "\x81\x77", "\x81\x79", "\x81\x8F", "\x81\x90", "\x81\x92",
|
||||
"\0"
|
||||
};
|
||||
MODULE_PRIVATE const char *ProhibitEnd_EUCJP[] =
|
||||
{
|
||||
"\x24", "\x28", "\x5B", "\x5C", "\x7B", "\x8E\xA2", "\xA1\xC6", "\xA1\xC8", "\xA1\xCA", "\xA1\xCC",
|
||||
"\xA1\xCE", "\xA1\xD0", "\xA1\xD2", "\xA1\xD4", "\xA1\xD6", "\xA1\xD8", "\xA1\xDA", "\xA1\xEF", "\xA1\xF0", "\xA1\xF2",
|
||||
"\0"
|
||||
};
|
||||
|
||||
/*
|
||||
* BIG5 table
|
||||
*/
|
||||
MODULE_PRIVATE const char *ProhibitEnd_BIG5[] =
|
||||
{
|
||||
"\x28", "\x5B", "\x7B", "\xA1\x5D", "\xA1\x5F", "\xA1\x61", "\xA1\x63", "\xA1\x65", "\xA1\x67", "\xA1\x69",
|
||||
"\xA1\x6D","\xA1\x6F","\xA1\x71","\xA1\x73", "\xA1\x75", "\xA1\x77", "\xA1\x79", "\xA1\x7B", "\xA1\x7D",
|
||||
"\xA1\xA1","\xA1\xA3","\xA1\xA5","\xA1\xA7", "\xA1\xA9", "\xA1\xAB", "\0"
|
||||
};
|
||||
/*
|
||||
Convert the table from BIG5 into CNS
|
||||
*/
|
||||
MODULE_PRIVATE const char *ProhibitEnd_CNS[] =
|
||||
{
|
||||
"\x28", "\x5B", "\x7B", "\xA1\xBE", "\xA1\xC0", "\xA1\xC2", "\xA1\xC4", "\xA1\xC6", "\xA1\xC8", "\xA1\xCA",
|
||||
"\xA1\xCE","\xA1\xD0","\xA1\xD2","\xA1\xD4", "\xA1\xD6", "\xA1\xD8", "\xA1\xDA", "\xA1\xDC", "\xA1\xDE",
|
||||
"\xA1\xE0","\xA1\xE2","\xA1\xE4","\xA1\xE6", "\xA1\xE8", "\xA1\xEA", "\0"
|
||||
};
|
||||
|
||||
MODULE_PRIVATE const char *ProhibitEnd_GB[] =
|
||||
{
|
||||
"\x28", "\x5B", "\x7B", "\xA1\xAE", "\xA1\xB0", "\xA1\xB2", "\xA1\xB4", "\xA1\xB6", "\xA1\xB8", "\xA1\xBA",
|
||||
"\xA1\xBC","\xA1\xBE","\xA3\xA8","\xA3\xAE", "\xA3\xDB", "\xA3\xFB", "\0"
|
||||
};
|
||||
|
||||
MODULE_PRIVATE const char *ProhibitEnd_KSC[] =
|
||||
{
|
||||
"\x28", "\x5B", "\x5C", "\x7B", "\xA1\xAE", "\xA1\xB0", "\xA1\xB2", "\xA1\xB4", "\xA1\xB6", "\xA1\xB8",
|
||||
"\xA1\xBA","\xA1\xBC","\xA3\xA4","\xA3\xA8","\xA3\xDB", "\xA3\xDC", "\xA3\xFB", "\0"
|
||||
};
|
||||
|
||||
/* ProhibitEnd_UTF8: Made by ftang. */
|
||||
MODULE_PRIVATE const char *ProhibitEnd_UTF8[] =
|
||||
{
|
||||
/* U+ 24 */ "\x24",
|
||||
/* U+ 28 */ "\x28",
|
||||
/* U+ 5B */ "\x5B",
|
||||
/* U+ 7B */ "\x7B",
|
||||
/* U+ A2 */ "\xC2\xA2",
|
||||
/* U+ A3 */ "\xC2\xA3",
|
||||
/* U+ A5 */ "\xC2\xA5",
|
||||
/* U+ AB */ "\xC2\xAB",
|
||||
/* U+2018 */ "\xE2\x80\x98",
|
||||
/* U+201C */ "\xE2\x80\x9C",
|
||||
/* U+3008 */ "\xE3\x80\x88",
|
||||
/* U+300A */ "\xE3\x80\x8A",
|
||||
/* U+300C */ "\xE3\x80\x8C",
|
||||
/* U+300E */ "\xE3\x80\x8E",
|
||||
/* U+3010 */ "\xE3\x80\x90",
|
||||
/* U+3014 */ "\xE3\x80\x94",
|
||||
/* U+3016 */ "\xE3\x80\x96",
|
||||
/* U+3018 */ "\xE3\x80\x98",
|
||||
/* U+301A */ "\xE3\x80\x9A",
|
||||
/* U+FF62 */ "\xEF\xBD\xA2",
|
||||
"\0"
|
||||
};
|
||||
|
||||
|
||||
@ -1,514 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* kinsukof.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
/* The table is defined in kinsukod.c */
|
||||
extern const char *ProhibitBegin_SJIS[];
|
||||
extern const char *ProhibitBegin_EUCJP[];
|
||||
extern const char *ProhibitBegin_BIG5[];
|
||||
extern const char *ProhibitBegin_GB[];
|
||||
extern const char *ProhibitBegin_KSC[];
|
||||
extern const char *ProhibitBegin_UTF8[];
|
||||
extern const char *ProhibitBegin_CNS[];
|
||||
|
||||
extern const char *ProhibitEnd_SJIS[];
|
||||
extern const char *ProhibitEnd_EUCJP[];
|
||||
extern const char *ProhibitEnd_BIG5[];
|
||||
extern const char *ProhibitEnd_GB[];
|
||||
extern const char *ProhibitEnd_KSC[];
|
||||
extern const char *ProhibitEnd_UTF8[];
|
||||
extern const char *ProhibitEnd_CNS[];
|
||||
|
||||
PUBLIC const char *INTL_NonBreakingSpace(uint16 win_csid)
|
||||
{
|
||||
|
||||
#ifdef XP_MAC
|
||||
return "\07"; /* 0x07 */
|
||||
#else
|
||||
return "\240"; /* 0xA0 */
|
||||
#endif
|
||||
|
||||
}
|
||||
/*
|
||||
INTL_CharClass is used for multibyte to divide character to different type
|
||||
*/
|
||||
#define IN_BETWEEN(a,b,c) (((a) <= (b)) && ((b) <= (c)))
|
||||
PUBLIC int
|
||||
INTL_CharClass(int charset, unsigned char *pstr)
|
||||
{
|
||||
int c1, c2, c3;
|
||||
|
||||
c1 = *pstr;
|
||||
|
||||
switch (charset)
|
||||
{
|
||||
case CS_SJIS:
|
||||
/*
|
||||
SEVEN_BIT_CHAR: [0x00-0x7F]
|
||||
HALFWIDTH_PRONOUNCE_CHAR: [0xA0-0xE0]
|
||||
FULLWIDTH_ASCII_CHAR: [0x82] [0x60-0x9A]
|
||||
[0x83] [0x9f-0xB6] ( Really no ASCII but Greek and Cyrillic )
|
||||
[0x83] [0xBF-0x8F]
|
||||
[0x84] [0x40-0x60]
|
||||
[0x84] [0x70-0x8F]
|
||||
FULLWIDTH_PRONOUNCE_CHAR: [0x82] [0x9F-0xF1]
|
||||
[0x83] [0x40-0x96]
|
||||
[0x81] [0x5B-0x5D]
|
||||
KANJI_CHAR: [0x88-0xFC] [xxxxxxxxx] (Except above)
|
||||
|
||||
Note: We count Cyrillic and Greek as FULLWIDTH_ASCII_CHAR
|
||||
|
||||
*/
|
||||
if (c1 < 0x80)
|
||||
return SEVEN_BIT_CHAR;
|
||||
|
||||
if (IN_BETWEEN(0xA0, c1, 0xE0))
|
||||
return HALFWIDTH_PRONOUNCE_CHAR;
|
||||
|
||||
c2 = *(pstr + 1);
|
||||
|
||||
switch(c1)
|
||||
{
|
||||
case 0x81:
|
||||
if(IN_BETWEEN(0x5B, c2, 0x5D))
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
break;
|
||||
|
||||
case 0x82:
|
||||
if(IN_BETWEEN(0x60, c2, 0x9A))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
|
||||
if(IN_BETWEEN(0x9F, c2, 0xF1))
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
break;
|
||||
|
||||
case 0x83:
|
||||
if(IN_BETWEEN(0x9F, c2, 0xB6) || IN_BETWEEN(0xBF, c2, 0xD0))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
|
||||
if(IN_BETWEEN(0x40, c2, 0x96))
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
break;
|
||||
|
||||
case 0x84:
|
||||
if(IN_BETWEEN(0x40, c2, 0x8F) || IN_BETWEEN(0xBF, c2, 0xD0))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (IN_BETWEEN(0x88, c1, 0xFC))
|
||||
return KANJI_CHAR;
|
||||
|
||||
return UNCLASSIFIED_CHAR;
|
||||
|
||||
case CS_EUCJP: /* TO BE TEST ON UNIX */
|
||||
/*
|
||||
SEVEN_BIT_CHAR: [0x00-0x7F]
|
||||
HALFWIDTH_PRONOUNCE_CHAR: [0x8E]
|
||||
FULLWIDTH_ASCII_CHAR: [0xA3] [0xC1-0xDA]
|
||||
[0xE1-0xFA]
|
||||
[0xA6] [0xA1-0xB8]
|
||||
[0xC1-0xD8]
|
||||
[0xA7] [0xA1-0xC1]
|
||||
[0xD1-0xF1]
|
||||
[0x8F] [0xA6-0xAF]
|
||||
FULLWIDTH_PRONOUNCE_CHAR: [0xA4] [xxxxxxx]
|
||||
[0xA5] [xxxxxxx]
|
||||
[0x81] [0x5B-0x5D]
|
||||
KANJI_CHAR: [0xB0-0xFF] [xxxx]
|
||||
[0x8F] [>0xB0]
|
||||
|
||||
Note: We count Cyrillic and Greek as FULLWIDTH_ASCII_CHAR
|
||||
|
||||
*/
|
||||
if (c1 < 0x80)
|
||||
return SEVEN_BIT_CHAR;
|
||||
|
||||
c2 = *(pstr + 1);
|
||||
|
||||
switch(c1)
|
||||
{
|
||||
case 0x8E:
|
||||
return HALFWIDTH_PRONOUNCE_CHAR;
|
||||
|
||||
case 0x8F:
|
||||
if(IN_BETWEEN(0xA6, c2, 0xAF))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
break;
|
||||
|
||||
case 0xA3:
|
||||
if(IN_BETWEEN(0xC1, c2, 0xDA) || IN_BETWEEN(0xE1, c2, 0xFA))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
break;
|
||||
|
||||
case 0xA4: case 0xA5:
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
|
||||
case 0xA6:
|
||||
if(IN_BETWEEN(0xA1, c2, 0xB8) || IN_BETWEEN(0xC1, c2, 0xD8))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
break;
|
||||
|
||||
case 0xA7:
|
||||
if(IN_BETWEEN(0xA1, c2, 0xC1) || IN_BETWEEN(0xD1, c2, 0xF1))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if(
|
||||
(c1 >= 0xB0) ||
|
||||
((c1 == 0x8F) && (c2 > 0xB0))
|
||||
)
|
||||
{
|
||||
return KANJI_CHAR;
|
||||
}
|
||||
|
||||
return UNCLASSIFIED_CHAR;
|
||||
|
||||
case CS_KSC_8BIT:
|
||||
/*
|
||||
SEVEN_BIT_CHAR: [0x00-0x80]
|
||||
HALFWIDTH_PRONOUNCE_CHAR: None
|
||||
FULLWIDTH_ASCII_CHAR: [0xA3] [0xC1-0xDA]
|
||||
[0xE1-0xFA]
|
||||
[0xA5] [0xC1-0xD8]
|
||||
[0xE1-0xF8]
|
||||
[0xAC] [0xA1-0xC2]
|
||||
[0xD1-0xF2]
|
||||
FULLWIDTH_PRONOUNCE_CHAR: [0xA4] [0xA1-0xFE]
|
||||
[0xB0-0xC8] [xxxxxxxxx]
|
||||
KANJI_CHAR: [0xCA-0xFD] [xxxxxxxxx]
|
||||
|
||||
Note: We didn't handle Hiragana and Katakana here
|
||||
We count Cyrillic and Greek as FULLWIDTH_ASCII_CHAR
|
||||
|
||||
*/
|
||||
if (c1 < 0x80)
|
||||
return SEVEN_BIT_CHAR;
|
||||
|
||||
c2 = *(pstr + 1);
|
||||
if (
|
||||
((c1== 0xA3) && (IN_BETWEEN(0xC1, c2, 0xDA) || IN_BETWEEN(0xE1, c2, 0xFA))) ||
|
||||
((c1== 0xA5) && (IN_BETWEEN(0xC1, c2, 0xD8) || IN_BETWEEN(0xE1, c2, 0xF8))) ||
|
||||
((c1== 0xAC) && (IN_BETWEEN(0xA1, c2, 0xC2) || IN_BETWEEN(0xD1, c2, 0xF2)))
|
||||
)
|
||||
{
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
}
|
||||
|
||||
if (
|
||||
((c1== 0xA4) && (IN_BETWEEN(0xA1, c2, 0xFE))) ||
|
||||
(IN_BETWEEN(0xB0, c1, 0xC8))
|
||||
)
|
||||
{
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
}
|
||||
|
||||
if (IN_BETWEEN(0xCA, c1, 0xFD))
|
||||
return KANJI_CHAR;
|
||||
|
||||
return UNCLASSIFIED_CHAR;
|
||||
|
||||
case CS_GB_8BIT:
|
||||
/*
|
||||
SEVEN_BIT_CHAR: [0x00-0x7F]
|
||||
HALFWIDTH_PRONOUNCE_CHAR:
|
||||
FULLWIDTH_ASCII_CHAR: [0xA3] [0xC1-0xDA]
|
||||
[0xE1-0xFA]
|
||||
[0xA6] [0xA1-0xB8] Greek
|
||||
[0xC1-0xD8]
|
||||
[0xA7] [0xA1-0xC1] Cyrillic
|
||||
[0xD1-0xF1]
|
||||
[0xA8] [0xA1-0xBA] European
|
||||
FULLWIDTH_PRONOUNCE_CHAR: [0xA4,0xA5,0xA8] [xxxx]
|
||||
KANJI_CHAR:
|
||||
*/
|
||||
if (c1 < 0x80)
|
||||
return SEVEN_BIT_CHAR;
|
||||
|
||||
c2 = *(pstr + 1);
|
||||
if (
|
||||
((c1== 0xA3) && (IN_BETWEEN(0xC1, c2, 0xDA) || IN_BETWEEN(0xE1, c2, 0xFA))) ||
|
||||
((c1== 0xA6) && (IN_BETWEEN(0xA1, c2, 0xB8) || IN_BETWEEN(0xC1, c2, 0xD8))) ||
|
||||
((c1== 0xA7) && (IN_BETWEEN(0xA1, c2, 0xC1) || IN_BETWEEN(0xD1, c2, 0xF1))) ||
|
||||
((c1== 0xA8) && (IN_BETWEEN(0xA1, c2, 0xBA)) )
|
||||
)
|
||||
{
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
}
|
||||
|
||||
if ((c1 == 0xA4) || (c1 == 0xA5) || (c1 == 0xA8))
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
|
||||
if (IN_BETWEEN(0xB0, c1, 0xF7))
|
||||
return KANJI_CHAR;
|
||||
|
||||
return UNCLASSIFIED_CHAR;
|
||||
|
||||
case CS_BIG5:
|
||||
/*
|
||||
SEVEN_BIT_CHAR: [0x00-0x7F]
|
||||
HALFWIDTH_PRONOUNCE_CHAR:
|
||||
FULLWIDTH_ASCII_CHAR: [0xA2] [0xCF-0xFF]
|
||||
[0xA3] [0x40-0x73]
|
||||
FULLWIDTH_PRONOUNCE_CHAR: [0xA3] [0x74-0x7E]
|
||||
[0xA1-0xBF]
|
||||
KANJI_CHAR: [0xA4-0xFF] [xxxxxxxxx]
|
||||
*/
|
||||
if (c1 < 0x80)
|
||||
return SEVEN_BIT_CHAR;
|
||||
|
||||
c2 = *(pstr + 1);
|
||||
|
||||
switch(c1)
|
||||
{
|
||||
case 0xA2:
|
||||
if (IN_BETWEEN(0xCF, c2, 0xFF))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
break;
|
||||
|
||||
case 0xA3:
|
||||
if (IN_BETWEEN(0x74, c2, 0x7E) || IN_BETWEEN(0xA1, c2, 0xBF))
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
|
||||
if (IN_BETWEEN(0x40, c2, 0x73))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (c1 >= 0xA4)
|
||||
return KANJI_CHAR;
|
||||
|
||||
return UNCLASSIFIED_CHAR;
|
||||
|
||||
case CS_CNS_8BIT: /* TO BE TEST ON UNIX */
|
||||
/*
|
||||
SEVEN_BIT_CHAR: [0x00-0x7F]
|
||||
HALFWIDTH_PRONOUNCE_CHAR:
|
||||
FULLWIDTH_ASCII_CHAR: [0xA4] [0xC1-0xFE]
|
||||
[0xA5] [0xA1-0xC6]
|
||||
FULLWIDTH_PRONOUNCE_CHAR: [0xA5] [0xC7-0xF0]
|
||||
KANJI_CHAR: [0xC4-0xFF] [xxxxxxxxx]
|
||||
[0x8E]
|
||||
*/
|
||||
if (c1 < 0x80)
|
||||
return SEVEN_BIT_CHAR;
|
||||
|
||||
c2 = *(pstr + 1);
|
||||
|
||||
switch(c1)
|
||||
{
|
||||
case 0xA4:
|
||||
if(IN_BETWEEN(0xC1, c2, 0xFE))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
break;
|
||||
|
||||
case 0xA5:
|
||||
if(IN_BETWEEN(0xC7, c2, 0xF0))
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
|
||||
if(IN_BETWEEN(0xA1, c2, 0xC6))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
break;
|
||||
}
|
||||
|
||||
if (IN_BETWEEN(0xC4, c1, 0x8E))
|
||||
return KANJI_CHAR;
|
||||
|
||||
return UNCLASSIFIED_CHAR;
|
||||
|
||||
case CS_UTF8:
|
||||
/*
|
||||
SEVEN_BIT_CHAR:
|
||||
|
||||
FULLWIDTH_ASCII_CHAR:
|
||||
U+0000 - U+10FF
|
||||
[C0-E0] [xxxx] Done
|
||||
[E1] [80-83] [xxxx] Done
|
||||
U+1E00 - U+1FFF
|
||||
[E1] [B8-BF] Done
|
||||
U+FF21 - U+FF3A
|
||||
[EF] [BC] [A1-BA] Done
|
||||
U+FF41 - U+FF5A
|
||||
[EF] [BD] [81-9A] Done
|
||||
|
||||
FULLWIDTH_PRONOUNCE_CHAR:
|
||||
U+1100 - U+11FF
|
||||
[E1] [84-87] Done
|
||||
U+3040 - U+318F
|
||||
[E3] [81-85] [xx] Done
|
||||
[E3] [86] [80-8F] Done
|
||||
U+FF66 - U+FFDC
|
||||
[EF] [BD] [AC-]
|
||||
[EF] [BE]
|
||||
[EF] [BF] [-9C]
|
||||
U+AC00 - U+D7FF
|
||||
[EA] [B0-] Done
|
||||
[EB-EC] [xxx] Done
|
||||
[ED] [-9F] Done
|
||||
|
||||
KANJI_CHAR:
|
||||
U+4E00 - U+9FFF
|
||||
[E4] [B8-] Done
|
||||
[E5-E9] [xx] Done
|
||||
*/
|
||||
if (c1 < 0x80)
|
||||
return SEVEN_BIT_CHAR;
|
||||
|
||||
if (IN_BETWEEN(0xC0, c1, 0xE0))
|
||||
{
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
}
|
||||
|
||||
c2 = *(pstr + 1);
|
||||
|
||||
switch(c1)
|
||||
{
|
||||
case 0xE1:
|
||||
if (IN_BETWEEN(0x80, c2, 0x83) || IN_BETWEEN(0xB8, c2, 0xBF))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
if (IN_BETWEEN(0x84, c2, 0x87))
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
|
||||
break;
|
||||
|
||||
case 0xE3:
|
||||
if (IN_BETWEEN(0x81, c2, 0x85))
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
|
||||
if (c2 == 0x86)
|
||||
{
|
||||
c3 = *(pstr + 2);
|
||||
if (IN_BETWEEN(0x80, c3, 0x8F))
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 0xE4:
|
||||
if (c2 >= 0xB8)
|
||||
return KANJI_CHAR;
|
||||
break;
|
||||
|
||||
case 0xE5: case 0xE6: case 0xE7: case 0xE8: case 0xE9:
|
||||
return KANJI_CHAR;
|
||||
break;
|
||||
|
||||
case 0xEA:
|
||||
if (c2 >= 0xB0)
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
break;
|
||||
|
||||
case 0xEB: case 0xEC:
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
break;
|
||||
|
||||
case 0xED:
|
||||
if (c2 <= 0x9F)
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
break;
|
||||
|
||||
case 0xEF:
|
||||
c3 = *(pstr + 2);
|
||||
switch(c2)
|
||||
{
|
||||
case 0xBC:
|
||||
if (IN_BETWEEN(0xA1, c3, 0xBA))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
break;
|
||||
|
||||
case 0xBD:
|
||||
if (IN_BETWEEN(0x81, c3, 0x9A))
|
||||
return FULLWIDTH_ASCII_CHAR;
|
||||
if (c3 >= 0xAC)
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
break;
|
||||
|
||||
case 0xBE:
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
break;
|
||||
|
||||
case 0xBF:
|
||||
if (c3 <= 0x9C)
|
||||
return FULLWIDTH_PRONOUNCE_CHAR;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return UNCLASSIFIED_CHAR;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return UNCLASSIFIED_CHAR;
|
||||
}
|
||||
|
||||
#define IF_A_IN_ARRAY_B_THEN_RETURN_C(a,b,c) \
|
||||
{ \
|
||||
int j; \
|
||||
for (j = 0; (b)[j][0]; j++) \
|
||||
if (XP_STRNCMP((char *)a, (b)[j], XP_STRLEN((b)[j])) == 0) \
|
||||
return (c); \
|
||||
}
|
||||
|
||||
#define IF_PROHIBIT_CLASS_THEN_RETURN(a,ba,ea) \
|
||||
{ \
|
||||
IF_A_IN_ARRAY_B_THEN_RETURN_C(a,ba,PROHIBIT_BEGIN_OF_LINE); \
|
||||
IF_A_IN_ARRAY_B_THEN_RETURN_C(a,ea,PROHIBIT_END_OF_LINE); \
|
||||
}
|
||||
|
||||
PUBLIC int INTL_KinsokuClass(int16 win_csid, unsigned char *pstr)
|
||||
{
|
||||
switch (win_csid)
|
||||
{
|
||||
case CS_SJIS:
|
||||
IF_PROHIBIT_CLASS_THEN_RETURN(pstr,ProhibitBegin_SJIS,ProhibitEnd_SJIS);
|
||||
break;
|
||||
case CS_EUCJP:
|
||||
IF_PROHIBIT_CLASS_THEN_RETURN(pstr,ProhibitBegin_EUCJP,ProhibitEnd_EUCJP);
|
||||
break;
|
||||
case CS_GB_8BIT:
|
||||
IF_PROHIBIT_CLASS_THEN_RETURN(pstr,ProhibitBegin_GB,ProhibitEnd_GB);
|
||||
break;
|
||||
case CS_BIG5:
|
||||
IF_PROHIBIT_CLASS_THEN_RETURN(pstr,ProhibitBegin_BIG5,ProhibitEnd_BIG5);
|
||||
break;
|
||||
case CS_CNS_8BIT:
|
||||
IF_PROHIBIT_CLASS_THEN_RETURN(pstr,ProhibitBegin_CNS,ProhibitEnd_CNS);
|
||||
break;
|
||||
case CS_KSC_8BIT:
|
||||
IF_PROHIBIT_CLASS_THEN_RETURN(pstr,ProhibitBegin_KSC,ProhibitEnd_KSC);
|
||||
break;
|
||||
case CS_UTF8:
|
||||
IF_PROHIBIT_CLASS_THEN_RETURN(pstr,ProhibitBegin_UTF8,ProhibitEnd_UTF8);
|
||||
if( *pstr <= 0xE2) /* UCS2 < 0x2000 */
|
||||
return PROHIBIT_WORD_BREAK;
|
||||
break;
|
||||
}
|
||||
|
||||
return PROHIBIT_NOWHERE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,109 +0,0 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build the libi18n tree
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH=..\..
|
||||
|
||||
#//--------------------------------------------------------------
|
||||
#// For the present, we are not building the DLL on Win16
|
||||
#//--------------------------------------------------------------
|
||||
|
||||
!if "$(MOZ_BITS)" == "32"
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DLLNAME=unicvt$(MOZ_BITS)
|
||||
!endif
|
||||
|
||||
#//--------------------------------------------------------------
|
||||
#// For the present, we are not building the DLL on Win16
|
||||
#//--------------------------------------------------------------
|
||||
#!if "$(MOZ_BITS)" == "16"
|
||||
#DEFFILE=$(DLLNAME).def
|
||||
#!endif
|
||||
|
||||
|
||||
!if "$(MOZ_BITS)" == "32"
|
||||
OBJS= \
|
||||
.\$(OBJDIR)\unicvt.obj \
|
||||
$(NULL)
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...)
|
||||
#// (these must be defined before the common makefiles are included)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
|
||||
LINCS=$(LINCS) -I_gen -I$(PUBLIC)\dbm -I$(DEPTH)\include -I$(XPDIST)\applet
|
||||
|
||||
!if defined(MOZ_DEBUG) && defined(GLOWCODE)
|
||||
LLIBS=$(LLIBS) $(GLOWDIR)\glowcode.lib
|
||||
!endif
|
||||
|
||||
#// End of MOZ_BITS == 32
|
||||
!endif
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...)
|
||||
#// (these must come before the common makefiles are included)
|
||||
#//
|
||||
#// DIRS - There are subdirectories to process
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DIRS=unicode
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
||||
#// More Win32 only stuff...
|
||||
|
||||
!if "$(MOZ_BITS)" == "32"
|
||||
|
||||
install:: $(DLL) $(LIBRARY)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib
|
||||
|
||||
|
||||
!endif
|
||||
@ -1,147 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* metatag.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
#include "xp.h"
|
||||
#include "libi18n.h"
|
||||
|
||||
|
||||
/*
|
||||
This function return csid if it finds Meta charset info
|
||||
|
||||
Currently there are two way to specify Meta charset
|
||||
1. <META HTTP-EQUIV=Content-Type CONTENT="text/html; charset=iso-8859-1">
|
||||
2. <META charset=iso-8859-1>
|
||||
|
||||
Right now, it scans for charset
|
||||
|
||||
*/
|
||||
|
||||
|
||||
MODULE_PRIVATE int PeekMetaCharsetTag(char *pSrc, int len)
|
||||
{
|
||||
char *p;
|
||||
char charset[MAX_CSNAME+1];
|
||||
int i, k;
|
||||
int n;
|
||||
char ch;
|
||||
|
||||
|
||||
for (i = 0; i < len; i++, pSrc++)
|
||||
{
|
||||
if (*pSrc != '<')
|
||||
continue;
|
||||
|
||||
pSrc ++ ;
|
||||
i ++ ;
|
||||
if ((i+13) > len) /* at least need more than 13 bytes */
|
||||
break;
|
||||
switch (*pSrc) {
|
||||
case 'm':
|
||||
case 'M':
|
||||
if (strncasecomp(pSrc, "meta", 4) == 0)
|
||||
{
|
||||
pSrc = pSrc + 4;
|
||||
i += 4;
|
||||
|
||||
n = len - i; /* set n here to make sure it won't go
|
||||
out of block boundary */
|
||||
for (p = pSrc; n > 0; p ++, n--)
|
||||
{
|
||||
if (*p == '>' || *p == '<')
|
||||
break ;
|
||||
|
||||
if (n < 9)
|
||||
{
|
||||
n = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((n > 9) && (*p == 'c' || *p == 'C') && strncasecomp(p, "charset", 7) == 0)
|
||||
{
|
||||
p += 7;
|
||||
n -= 7;
|
||||
while ((n > 0) && (*p == ' ' || *p == '\t')) /* skip spaces */
|
||||
{
|
||||
p ++ ;
|
||||
n --;
|
||||
}
|
||||
if (n <= 0 || *p != '=')
|
||||
break;
|
||||
p ++;
|
||||
n --;
|
||||
while ((n > 0) && (*p == ' ' || *p == '\t')) /* skip spaces */
|
||||
{
|
||||
n --;
|
||||
p ++ ;
|
||||
}
|
||||
|
||||
if (n <= 0)
|
||||
break;
|
||||
/* now we go to find real charset name and convert it to csid */
|
||||
if (*p == '\"' || *p == '\'')
|
||||
{
|
||||
p ++ ;
|
||||
n -- ;
|
||||
for (k = 0; n > 0 && k < MAX_CSNAME && *p != '\'' && *p != '\"'; p++, k++, n--)
|
||||
charset[k] = *p ;
|
||||
charset[k] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
for (k = 0; n > 0 && k < MAX_CSNAME && *p != '\'' && *p != '\"' && *p != '>'; p++, k++, n--)
|
||||
charset[k] = *p ;
|
||||
charset[k] = '\0';
|
||||
}
|
||||
|
||||
if (*charset && (n >= 0)) /* ftang : change from if (*charset && (n > 0)) */
|
||||
{
|
||||
int16 doc_csid = INTL_CharSetNameToID(charset);
|
||||
|
||||
if (doc_csid == CS_UNKNOWN)
|
||||
{
|
||||
doc_csid = CS_DEFAULT;
|
||||
}
|
||||
return doc_csid;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (n == 0) /* no more data left */
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case 'b':
|
||||
case 'B': /* quit if we see <BODY ...> tag */
|
||||
if (strncasecomp(pSrc, "body", 4) == 0)
|
||||
return 0;
|
||||
break;
|
||||
case 'p':
|
||||
case 'P': /* quit if we see <P ...> tag */
|
||||
ch = *(pSrc + 1);
|
||||
if (ch == '>' || ch == ' ' || ch == '\t')
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,343 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* net_junk.c */
|
||||
|
||||
/*#include "intlpriv.h"*/
|
||||
#include "xp.h"
|
||||
#include "intl_csi.h"
|
||||
#include "libi18n.h"
|
||||
#include "net_junk.h"
|
||||
#include "libmocha.h"
|
||||
|
||||
|
||||
MODULE_PRIVATE int16 PeekMetaCharsetTag (char *, uint32);
|
||||
MODULE_PRIVATE int16 DetectUCS2 (CCCDataObject, unsigned char *, int32);
|
||||
|
||||
typedef struct {
|
||||
Stream *current_stream;
|
||||
Stream *next_stream;
|
||||
CCCDataObject obj;
|
||||
} NetStreamData;
|
||||
|
||||
extern unsigned char *One2OneCCC(CCCDataObject,unsigned char *,int32);
|
||||
PRIVATE int net_AutoCharCodeConv (NET_StreamClass *stream, const char *s, int32 l);
|
||||
PRIVATE int net_1to1CCC (NET_StreamClass *stream, const unsigned char *s, int32 l);
|
||||
|
||||
PRIVATE void net_CvtCharCodeComplete (NET_StreamClass *stream)
|
||||
{
|
||||
NetStreamData *nsd=stream->data_object;
|
||||
unsigned char *uncvtbuf;
|
||||
|
||||
uncvtbuf = INTL_GetCCCUncvtbuf(nsd->obj);
|
||||
|
||||
/* pass downstream any uncoverted characters */
|
||||
if (uncvtbuf[0] != '\0')
|
||||
(*nsd->next_stream->put_block)(nsd->next_stream,
|
||||
(const char *)uncvtbuf, strlen((char *)uncvtbuf));
|
||||
|
||||
(*nsd->next_stream->complete)(nsd->next_stream);
|
||||
|
||||
XP_FREE(nsd->next_stream);
|
||||
XP_FREE(nsd->obj);
|
||||
XP_FREE(nsd);
|
||||
return;
|
||||
}
|
||||
|
||||
PRIVATE void net_CvtCharCodeAbort (NET_StreamClass *stream, int status)
|
||||
{
|
||||
NetStreamData *nsd=stream->data_object;
|
||||
(*nsd->next_stream->abort)(nsd->next_stream, status);
|
||||
|
||||
XP_FREE(nsd->next_stream);
|
||||
XP_FREE(nsd->obj);
|
||||
XP_FREE(nsd);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
PRIVATE int
|
||||
net_CharCodeConv( NET_StreamClass *stream,
|
||||
const unsigned char *buf, /* buffer for conversion */
|
||||
int32 bufsz) /* buffer size in bytes */
|
||||
{
|
||||
NetStreamData *nsd=stream->data_object;
|
||||
unsigned char *tobuf;
|
||||
int rv;
|
||||
CCCFunc cvtfunc;
|
||||
|
||||
cvtfunc = INTL_GetCCCCvtfunc(nsd->obj);
|
||||
|
||||
tobuf = (unsigned char *)cvtfunc(nsd->obj, buf, bufsz);
|
||||
|
||||
if (tobuf) {
|
||||
rv = (*nsd->next_stream->put_block) (nsd->next_stream,
|
||||
(const char *)tobuf, INTL_GetCCCLen(nsd->obj));
|
||||
if (tobuf != buf)
|
||||
XP_FREE(tobuf);
|
||||
return(rv);
|
||||
} else {
|
||||
return(INTL_GetCCCRetval(nsd->obj));
|
||||
}
|
||||
}
|
||||
|
||||
/* Null Char Code Conversion module -- pass unconverted data downstream */
|
||||
/* PRIVATE */ int
|
||||
net_NoCharCodeConv (NET_StreamClass *stream, const char *s, int32 l)
|
||||
{
|
||||
NetStreamData*nsd=stream->data_object;
|
||||
return((*nsd->next_stream->put_block)(nsd->next_stream,s,l));
|
||||
}
|
||||
|
||||
PRIVATE int
|
||||
net_AutoCharCodeConv (NET_StreamClass *stream, const char *s, int32 l)
|
||||
{
|
||||
NetStreamData*nsd=stream->data_object;
|
||||
int16 doc_csid;
|
||||
unsigned char *tobuf = NULL;
|
||||
int rv;
|
||||
CCCFunc cvtfunc;
|
||||
|
||||
cvtfunc = INTL_GetCCCCvtfunc(nsd->obj);
|
||||
|
||||
/* for debugging -- erik */
|
||||
#if 0
|
||||
{
|
||||
static FILE *f = NULL;
|
||||
|
||||
if (!f)
|
||||
{
|
||||
f = fopen("/tmp/zzz", "w");
|
||||
}
|
||||
|
||||
if (f && s && (l > 0))
|
||||
{
|
||||
(void) fwrite(s, 1, l, f);
|
||||
}
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
if (cvtfunc != NULL)
|
||||
tobuf = (unsigned char *)cvtfunc(nsd->obj, (unsigned char *)s, l);
|
||||
else
|
||||
{
|
||||
/* Look at the first block and see if we determine
|
||||
* what the charset is from that block.
|
||||
*/
|
||||
|
||||
/* Somehow NET_PlainTextConverter() put a "<plaintext>" in the
|
||||
first block. Try to bypass that block
|
||||
We need this so we can detect UCS2 for the NT UCS2 plantext
|
||||
*/
|
||||
if((l == 11) && (strncmp(s, "<plaintext>", 11)==0))
|
||||
{
|
||||
return((*nsd->next_stream->put_block)(nsd->next_stream,s,l));
|
||||
}
|
||||
/* check for unicode (ucs2) */
|
||||
doc_csid = DetectUCS2(nsd->obj, (unsigned char *)s, l);
|
||||
if(doc_csid == CS_DEFAULT)
|
||||
{
|
||||
doc_csid = PeekMetaCharsetTag((char *)s, l) ;
|
||||
if (doc_csid == CS_ASCII) /* the header said ascii. */
|
||||
{
|
||||
nsd->current_stream->put_block = (MKStreamWriteFunc) net_NoCharCodeConv;
|
||||
return((*nsd->next_stream->put_block)(nsd->next_stream,s,l));
|
||||
}
|
||||
}
|
||||
|
||||
/* We looked at the first block but did not determine
|
||||
* what the charset is. Install the default converter
|
||||
* now. It could be a standard or an auto-detecting converter.
|
||||
*/
|
||||
if (doc_csid != CS_DEFAULT)
|
||||
{
|
||||
(void) INTL_GetCharCodeConverter(doc_csid, 0, nsd->obj);
|
||||
INTL_CallCCCReportAutoDetect(nsd->obj, doc_csid);
|
||||
}
|
||||
else
|
||||
(void) INTL_GetCharCodeConverter(INTL_GetCCCDefaultCSID(nsd->obj),0,nsd->obj);
|
||||
cvtfunc = INTL_GetCCCCvtfunc(nsd->obj);
|
||||
|
||||
/* If no conversion needed, change put_block module for successive
|
||||
* data blocks. For current data block, return unmodified buffer.
|
||||
*/
|
||||
if (cvtfunc == NULL)
|
||||
{
|
||||
return((*nsd->next_stream->put_block)(nsd->next_stream,s,l));
|
||||
}
|
||||
|
||||
/* For initial block, must call converter directly. Success calls
|
||||
* to the converter will be called directly from net_CharCodeConv()
|
||||
*/
|
||||
}
|
||||
|
||||
if (tobuf == NULL)
|
||||
tobuf = (unsigned char *)cvtfunc(nsd->obj, (unsigned char *)s, l);
|
||||
|
||||
if (tobuf) {
|
||||
rv = (*nsd->next_stream->put_block) (nsd->next_stream,
|
||||
(const char *)tobuf, INTL_GetCCCLen(nsd->obj));
|
||||
if (tobuf != (unsigned char*)s)
|
||||
XP_FREE(tobuf);
|
||||
return(rv);
|
||||
} else {
|
||||
return(INTL_GetCCCRetval(nsd->obj));
|
||||
}
|
||||
}
|
||||
|
||||
/* One-byte-to-one-byte Char Code Conversion module.
|
||||
* Table driven. Table provided by FE.
|
||||
*/
|
||||
PRIVATE int
|
||||
net_1to1CCC (NET_StreamClass *stream, const unsigned char *s, int32 l)
|
||||
{
|
||||
NetStreamData *nsd=stream->data_object;
|
||||
(void) One2OneCCC (nsd->obj, (unsigned char *)s, l);
|
||||
return((*nsd->next_stream->put_block)(nsd->next_stream,
|
||||
(const char *)s, INTL_GetCCCLen(nsd->obj)));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* We are always ready for writing, but the next stream might not
|
||||
* be so, since we aren't willing to buffer, tell netlib the
|
||||
* next stream's buffer size
|
||||
*/
|
||||
PRIVATE unsigned int net_CvtCharCodeWriteReady (NET_StreamClass *stream)
|
||||
{
|
||||
NetStreamData *nsd=stream->data_object;
|
||||
return ((*nsd->next_stream->is_write_ready)(nsd->next_stream));
|
||||
}
|
||||
|
||||
PRIVATE void
|
||||
net_report_autodetect(void *closure, CCCDataObject obj, uint16 doc_csid)
|
||||
{
|
||||
NetStreamData *nsd = (NetStreamData *)closure;
|
||||
iDocumentContext doc_context = nsd->current_stream->window_id;
|
||||
CCCFunc cvtfunc = INTL_GetCCCCvtfunc(obj);
|
||||
INTL_CharSetInfo c = LO_GetDocumentCharacterSetInfo(doc_context);
|
||||
|
||||
INTL_SetCSIDocCSID(c, doc_csid);
|
||||
/* I hope it is okay, to set the win_csid */
|
||||
INTL_SetCSIWinCSID(c, INTL_GetCCCToCSID(obj));
|
||||
if (cvtfunc == NULL)
|
||||
nsd->current_stream->put_block = (MKStreamWriteFunc) net_NoCharCodeConv;
|
||||
}
|
||||
|
||||
PUBLIC Stream *
|
||||
INTL_ConvCharCode (int format_out,
|
||||
void *data_obj,
|
||||
URL_Struct *URL_s,
|
||||
MWContext *mwcontext)
|
||||
{
|
||||
NetStreamData *nsd;
|
||||
CCCDataObject obj;
|
||||
Stream *stream;
|
||||
iDocumentContext doc_context = (iDocumentContext)mwcontext;
|
||||
INTL_CharSetInfo c = LO_GetDocumentCharacterSetInfo(doc_context);
|
||||
XP_Bool is_metacharset_reload;
|
||||
uint16 default_doc_csid = INTL_DefaultDocCharSetID(mwcontext);
|
||||
/*
|
||||
Should this be ?
|
||||
uint16 default_doc_csid = FE_DefaultDocCharSetID(mwcontext);
|
||||
*/
|
||||
|
||||
|
||||
TRACEMSG(("Setting up display stream. Have URL: %s\n", URL_s->address));
|
||||
|
||||
stream = XP_NEW_ZAP(Stream);
|
||||
if(stream == NULL)
|
||||
return(NULL);
|
||||
|
||||
stream->name = "CharCodeConverter";
|
||||
stream->complete = (MKStreamCompleteFunc) net_CvtCharCodeComplete;
|
||||
stream->abort = (MKStreamAbortFunc) net_CvtCharCodeAbort;
|
||||
|
||||
stream->is_write_ready = (MKStreamWriteReadyFunc) net_CvtCharCodeWriteReady;
|
||||
stream->window_id = doc_context;
|
||||
|
||||
/* initialize the doc_csid (etc.) unless if this is a reload caused by meta charset */
|
||||
if ((NET_RESIZE_RELOAD == URL_s->resize_reload)
|
||||
&& (METACHARSET_FORCERELAYOUT == INTL_GetCSIRelayoutFlag(c)))
|
||||
is_metacharset_reload = TRUE;
|
||||
else
|
||||
is_metacharset_reload = FALSE;
|
||||
|
||||
INTL_CSIInitialize(c, is_metacharset_reload, URL_s->charset,
|
||||
mwcontext->type, default_doc_csid);
|
||||
|
||||
obj = INTL_CreateDocumentCCC(c, default_doc_csid);
|
||||
if (obj == NULL) {
|
||||
XP_FREE(stream);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
nsd = XP_NEW_ZAP(NetStreamData);
|
||||
if(nsd == NULL) {
|
||||
XP_FREE(stream);
|
||||
XP_FREE(obj);
|
||||
return(NULL);
|
||||
}
|
||||
nsd->current_stream = stream;
|
||||
nsd->obj = obj;
|
||||
stream->data_object = nsd; /* document info object */
|
||||
INTL_SetCCCReportAutoDetect(obj, net_report_autodetect, nsd);
|
||||
|
||||
|
||||
if (INTL_GetCSIDocCSID(c) == CS_DEFAULT || INTL_GetCSIDocCSID(c) == CS_UNKNOWN)
|
||||
{
|
||||
/* we know the default converter but do not install it yet.
|
||||
* Instead wait until the first block and see if we can determine
|
||||
* what the actual charset is from http/meta tags or from the
|
||||
* first block. By delaying we can avoid a reload if
|
||||
* we get a different charset from http/meta tag or the first block.
|
||||
*/
|
||||
stream->put_block = (MKStreamWriteFunc) net_AutoCharCodeConv;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (INTL_GetCCCCvtfunc(obj) == NULL)
|
||||
stream->put_block = (MKStreamWriteFunc) net_NoCharCodeConv;
|
||||
else if (INTL_GetCCCCvtfunc(obj) == (CCCFunc)One2OneCCC)
|
||||
stream->put_block = (MKStreamWriteFunc) net_1to1CCC;
|
||||
else
|
||||
stream->put_block = (MKStreamWriteFunc) net_CharCodeConv;
|
||||
}
|
||||
|
||||
TRACEMSG(("Returning stream from NET_CvtCharCodeConverter\n"));
|
||||
|
||||
/* remap content type to be to INTERNAL_PARSER
|
||||
*/
|
||||
StrAllocCopy(URL_s->content_type, INTERNAL_PARSER);
|
||||
|
||||
#ifdef JSDEBUGGER
|
||||
nsd->next_stream = LM_StreamBuilder(format_out, NULL, URL_s, mwcontext);
|
||||
#else
|
||||
nsd->next_stream = NET_StreamBuilder(format_out, URL_s, doc_context);
|
||||
#endif /* JSDEBUGGER */
|
||||
|
||||
if(!nsd->next_stream)
|
||||
{
|
||||
XP_FREE(obj);
|
||||
XP_FREE(stream);
|
||||
XP_FREE(nsd);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* net_junk.h */
|
||||
|
||||
#ifndef NET_JUNK_H
|
||||
#define NET_JUNK_H
|
||||
|
||||
#define Stream NET_StreamClass
|
||||
#define URL URL_Struct
|
||||
|
||||
typedef struct _NET_JUNK_STREAM_DATA {
|
||||
Stream *stream;
|
||||
CCCDataObject obj;
|
||||
} NET_JUNK_STREAM_DATA;
|
||||
|
||||
|
||||
#endif /* NET_JUNK_H */
|
||||
@ -1,171 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "intlpriv.h"
|
||||
#include "libi18n.h"
|
||||
|
||||
/* Private Function */
|
||||
PRIVATE void
|
||||
INTL_CompoundStrAddSeg_p(
|
||||
INTL_CompoundStr* This,
|
||||
INTL_Encoding_ID inencoding,
|
||||
unsigned char* intext);
|
||||
PRIVATE INTL_CompoundStr* INTL_CompoundStrNewSeg_p(INTL_Encoding_ID inencoding, unsigned char* intext);
|
||||
|
||||
|
||||
/*
|
||||
Not Support Function - Too Complex to Implement!!! Believe it or not.
|
||||
INTL_CompoundStrComp : We currently dont implement this funciton. If we decide to implement it. We should use the following algorithm
|
||||
(1) Compare each segment. If all match, return 0.
|
||||
(2) Convert both string to Unicode and them compare. If it equal in Unicode, return 0
|
||||
(3) If they are not the same in Unicode, we have to pick one sorting sequence to decide wheather it should return 1 or -1.
|
||||
The problem is which sorting order should we follow ? We need to decide :
|
||||
(a) the sorting order in one script,
|
||||
(b) the sorting order between scripts
|
||||
*/
|
||||
|
||||
/* Implementation */
|
||||
PUBLIC INTL_CompoundStr* INTL_CompoundStrFromStr(INTL_Encoding_ID inencoding, unsigned char* intext)
|
||||
{
|
||||
return INTL_CompoundStrNewSeg_p(inencoding, intext);
|
||||
}
|
||||
|
||||
#define TMPLEN 256
|
||||
PUBLIC INTL_CompoundStr*
|
||||
INTL_CompoundStrFromUnicode(INTL_Unicode* inunicode, uint32 inunicodelen)
|
||||
{
|
||||
INTL_Encoding_ID encoding;
|
||||
unsigned char TMP[TMPLEN];
|
||||
INTL_UnicodeToStrIterator iterator;
|
||||
if((iterator = INTL_UnicodeToStrIteratorCreate(inunicode,
|
||||
inunicodelen,
|
||||
&encoding,
|
||||
&TMP[0], TMPLEN))!=NULL)
|
||||
{
|
||||
INTL_CompoundStr *This;
|
||||
This = INTL_CompoundStrNewSeg_p(encoding, &TMP[0]);
|
||||
if(This != NULL)
|
||||
{
|
||||
while(INTL_UnicodeToStrIterate(iterator, &encoding, &TMP[0], TMPLEN))
|
||||
INTL_CompoundStrAddSeg_p(This, encoding, &TMP[0]);
|
||||
}
|
||||
INTL_UnicodeToStrIteratorDestroy(iterator);
|
||||
return This;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PUBLIC INTL_CompoundStrIterator
|
||||
INTL_CompoundStrFirstStr(INTL_CompoundStr* This, INTL_Encoding_ID *outencoding, unsigned char** outtext)
|
||||
{
|
||||
if(This == NULL)
|
||||
return NULL;
|
||||
else
|
||||
{
|
||||
*outencoding = This->encoding;
|
||||
*outtext = This->text;
|
||||
return ((INTL_CompoundStrIterator)This);
|
||||
}
|
||||
}
|
||||
PUBLIC INTL_CompoundStrIterator
|
||||
INTL_CompoundStrNextStr(INTL_CompoundStrIterator iterator, INTL_Encoding_ID *outencoding, unsigned char** outtext)
|
||||
{
|
||||
INTL_CompoundStr* This = (INTL_CompoundStr*)iterator;
|
||||
return INTL_CompoundStrFirstStr(
|
||||
This->next,
|
||||
outencoding, outtext);
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
INTL_CompoundStrDestroy(INTL_CompoundStr* This)
|
||||
{
|
||||
INTL_CompoundStr* Next;
|
||||
for(; (This != NULL); This=Next)
|
||||
{
|
||||
if(This->next)
|
||||
Next=This->next;
|
||||
else
|
||||
Next=NULL;
|
||||
XP_FREE(This->text);
|
||||
XP_FREE(This);
|
||||
}
|
||||
}
|
||||
|
||||
PUBLIC INTL_CompoundStr*
|
||||
INTL_CompoundStrClone(INTL_CompoundStr* s2)
|
||||
{
|
||||
if(s2 != NULL)
|
||||
{
|
||||
INTL_CompoundStr* This;
|
||||
This=INTL_CompoundStrNewSeg_p(s2->encoding, s2->text);
|
||||
This->next=INTL_CompoundStrClone(s2->next);
|
||||
return This;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
PRIVATE
|
||||
void
|
||||
INTL_CompoundStrCat_p(INTL_CompoundStr* s1, INTL_CompoundStr* s2)
|
||||
{
|
||||
if(s1->next != NULL)
|
||||
INTL_CompoundStrCat_p(s1->next, s2);
|
||||
else
|
||||
s1->next = INTL_CompoundStrClone(s2);
|
||||
}
|
||||
PUBLIC void
|
||||
INTL_CompoundStrCat(INTL_CompoundStr* s1, INTL_CompoundStr* s2)
|
||||
{
|
||||
if((s2 != NULL) && (s2->text[0]))
|
||||
INTL_CompoundStrCat_p(s1, s2);
|
||||
}
|
||||
|
||||
PRIVATE
|
||||
INTL_CompoundStr*
|
||||
INTL_CompoundStrNewSeg_p(INTL_Encoding_ID inencoding, unsigned char* intext)
|
||||
{
|
||||
INTL_CompoundStr *This;
|
||||
|
||||
This = XP_ALLOC(sizeof(INTL_CompoundStr));
|
||||
if(This != NULL)
|
||||
{
|
||||
char *p_text=0;
|
||||
StrAllocCopy(p_text, (char*)intext);
|
||||
This->text = (unsigned char*)p_text;
|
||||
|
||||
This->next = NULL;
|
||||
This->encoding = inencoding;
|
||||
}
|
||||
return This;
|
||||
}
|
||||
|
||||
PRIVATE
|
||||
void
|
||||
INTL_CompoundStrAddSeg_p(
|
||||
INTL_CompoundStr* This,
|
||||
INTL_Encoding_ID inencoding,
|
||||
unsigned char* intext)
|
||||
{
|
||||
if(*intext)
|
||||
{
|
||||
for(;This->next;This=This->next)
|
||||
;
|
||||
This->next = INTL_CompoundStrNewSeg_p(inencoding,intext);
|
||||
}
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#ifndef _PINTLCMP_H_
|
||||
#define _PINTLCMP_H_
|
||||
#include "intlpriv.h"
|
||||
|
||||
typedef struct {
|
||||
unsigned char src_b1;
|
||||
unsigned char src_b2_start;
|
||||
unsigned char src_b2_end;
|
||||
unsigned char dest_b1;
|
||||
unsigned char dest_b2_start;
|
||||
} DoubleByteToLowerMap;
|
||||
|
||||
/* Prototype for private function */
|
||||
MODULE_PRIVATE DoubleByteToLowerMap *INTL_GetDoubleByteToLowerMap(int16 csid);
|
||||
MODULE_PRIVATE unsigned char *INTL_GetSingleByteToLowerMap(int16 csid);
|
||||
|
||||
#endif /* _PINTLCMP_H_ */
|
||||
|
||||
|
||||
@ -1,442 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* sbconvtb.c */
|
||||
/*
|
||||
Function that handle single byte Conversion table
|
||||
*/
|
||||
#include "intlpriv.h"
|
||||
|
||||
/* ------------------------------------------------*
|
||||
XP_MAC
|
||||
* ------------------------------------------------*/
|
||||
#ifdef XP_MAC
|
||||
|
||||
PUBLIC char **
|
||||
INTL_GetSingleByteTable(int16 from_csid, int16 to_csid, int32 resourceid)
|
||||
{
|
||||
return FE_GetSingleByteTable(from_csid, to_csid,resourceid);
|
||||
}
|
||||
PUBLIC char *INTL_LockTable(char **cvthdl)
|
||||
{
|
||||
return *cvthdl;
|
||||
}
|
||||
PUBLIC void INTL_FreeSingleByteTable(char **cvthdl)
|
||||
{
|
||||
FE_FreeSingleByteTable(cvthdl);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------*
|
||||
XP_WIN
|
||||
* ------------------------------------------------*/
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
|
||||
|
||||
|
||||
PUBLIC char **
|
||||
INTL_GetSingleByteTable(int16 from_csid, int16 to_csid, int32 resourceid)
|
||||
{
|
||||
return FE_GetSingleByteTable(from_csid, to_csid,resourceid);
|
||||
}
|
||||
PUBLIC char *INTL_LockTable(char **cvthdl)
|
||||
{
|
||||
return FE_LockTable(cvthdl);
|
||||
}
|
||||
PUBLIC void INTL_FreeSingleByteTable(char **cvthdl)
|
||||
{
|
||||
FE_FreeSingleByteTable(cvthdl);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------*
|
||||
XP_UNIX
|
||||
* ------------------------------------------------*/
|
||||
#ifdef XP_UNIX
|
||||
/* TRANSLATION RESOURCES */
|
||||
/* Tables for Win CP1252 -> ISO 8859-1 */
|
||||
PRIVATE unsigned char cp1252_to_iso8859_1[] = {
|
||||
/*8x*/ '?', '?', ',', 'f', '?', '?', '?', '?', '^', '?', 'S', '<', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '*', '-', '-', '~', '?', 's', '>', '?', '?', '?', 'Y',
|
||||
/*Ax*/ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
|
||||
/*Bx*/ 0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
|
||||
/*Cx*/ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
|
||||
/*Dx*/ 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
|
||||
/*Ex*/ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
||||
/*Fx*/ 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
|
||||
};
|
||||
|
||||
PRIVATE char *cp1252_to_iso8859_1_p = (char*)cp1252_to_iso8859_1;
|
||||
|
||||
/* Translation 8859-5.txt -> koi8r.txt */
|
||||
/* There are total 61 character unmap !! */
|
||||
PRIVATE unsigned char iso8859_5_to_koi8r[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Ax*/ 0x9A,0xB3, '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Bx*/ 0xE1,0xE2,0xF7,0xE7,0xE4,0xE5,0xF6,0xFA,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,
|
||||
/*Cx*/ 0xF2,0xF3,0xF4,0xF5,0xE6,0xE8,0xE3,0xFE,0xFB,0xFD,0xFF,0xF9,0xF8,0xFC,0xE0,0xF1,
|
||||
/*Dx*/ 0xC1,0xC2,0xD7,0xC7,0xC4,0xC5,0xD6,0xDA,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,
|
||||
/*Ex*/ 0xD2,0xD3,0xD4,0xD5,0xC6,0xC8,0xC3,0xDE,0xDB,0xDD,0xDF,0xD9,0xD8,0xDC,0xC0,0xD1,
|
||||
/*Fx*/ '?',0xA3, '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
};
|
||||
PRIVATE char *iso8859_5_to_koi8r_p = (char*)iso8859_5_to_koi8r;
|
||||
|
||||
/* Translation koi8r.txt -> 8859-5.txt */
|
||||
/* There are total 61 character unmap !! */
|
||||
PRIVATE unsigned char koi8r_to_iso8859_5[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',0xA0, '?', '?', '?', '?', '?',
|
||||
/*Ax*/ '?', '?', '?',0xF1, '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Bx*/ '?', '?', '?',0xA1, '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Cx*/ 0xEE,0xD0,0xD1,0xE6,0xD4,0xD5,0xE4,0xD3,0xE5,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,
|
||||
/*Dx*/ 0xDF,0xEF,0xE0,0xE1,0xE2,0xE3,0xD6,0xD2,0xEC,0xEB,0xD7,0xE8,0xED,0xE9,0xE7,0xEA,
|
||||
/*Ex*/ 0xCE,0xB0,0xB1,0xC6,0xB4,0xB5,0xC4,0xB3,0xC5,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,
|
||||
/*Fx*/ 0xBF,0xCF,0xC0,0xC1,0xC2,0xC3,0xB6,0xB2,0xCC,0xCB,0xB7,0xC8,0xCD,0xC9,0xC7,0xCA,
|
||||
};
|
||||
PRIVATE char *koi8r_to_iso8859_5_p = (char*)koi8r_to_iso8859_5;
|
||||
|
||||
/* Translation cp1250 -> 8859-2
|
||||
* There are 32 characters unmapped:
|
||||
* 80 - 89, 8B, 90 - 99, 9B, A6, A9, AB, AC, AE, B1, B5, B6, B7, BB
|
||||
*/
|
||||
PRIVATE unsigned char cp1250_to_iso8859_2[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',0xA9, '?',0xA6,0xAB,0xAE,0xAC,
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',0xB9, '?',0xB6,0xBB,0xBE,0xBC,
|
||||
/*Ax*/ 0xA0,0xB7,0xA2,0xA3,0xA4,0xA1, '?',0xA7,0xA8, '?',0xAA, '?', '?',0xAD, '?',0xAF,
|
||||
/*Bx*/ 0xB0, '?',0xB2,0xB3,0xB4, '?', '?', '?',0xB8,0xB1,0xBA, '?',0xA5,0xBD,0xB5,0xBF,
|
||||
/*Cx*/ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
|
||||
/*Dx*/ 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
|
||||
/*Ex*/ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
||||
/*Fx*/ 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
|
||||
};
|
||||
PRIVATE char *cp1250_to_iso8859_2_p = (char*)cp1250_to_iso8859_2;
|
||||
|
||||
/* Translation 8859-5.txt -> koi8u.txt
|
||||
* There are total 55 character unmap !!
|
||||
*/
|
||||
PRIVATE unsigned char iso8859_5_to_koi8u[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Ax*/ 0x9A,0xB3, '?', '?',0xB4, '?',0xB6,0xB7, '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Bx*/ 0xE1,0xE2,0xF7,0xE7,0xE4,0xE5,0xF6,0xFA,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,
|
||||
/*Cx*/ 0xF2,0xF3,0xF4,0xF5,0xE6,0xE8,0xE3,0xFE,0xFB,0xFD,0xFF,0xF9,0xF8,0xFC,0xE0,0xF1,
|
||||
/*Dx*/ 0xC1,0xC2,0xD7,0xC7,0xC4,0xC5,0xD6,0xDA,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,
|
||||
/*Ex*/ 0xD2,0xD3,0xD4,0xD5,0xC6,0xC8,0xC3,0xDE,0xDB,0xDD,0xDF,0xD9,0xD8,0xDC,0xC0,0xD1,
|
||||
/*Fx*/ '?',0xA3, '?', '?',0xA4, '?',0xA6,0xA7, '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
};
|
||||
PRIVATE char *iso8859_5_to_koi8u_p = (char*)iso8859_5_to_koi8u;
|
||||
|
||||
/* Translation koi8u.txt -> 8859-5.txt
|
||||
* There are total 55 character unmap !!
|
||||
*/
|
||||
PRIVATE unsigned char koi8u_to_iso8859_5[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',0xA0, '?', '?', '?', '?', '?',
|
||||
/*Ax*/ '?', '?', '?',0xF1,0xF4, '?',0xF6,0xF7, '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Bx*/ '?', '?', '?',0xA1,0xA4, '?',0xA6,0xA7, '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Cx*/ 0xEE,0xD0,0xD1,0xE6,0xD4,0xD5,0xE4,0xD3,0xE5,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,
|
||||
/*Dx*/ 0xDF,0xEF,0xE0,0xE1,0xE2,0xE3,0xD6,0xD2,0xEC,0xEB,0xD7,0xE8,0xED,0xE9,0xE7,0xEA,
|
||||
/*Ex*/ 0xCE,0xB0,0xB1,0xC6,0xB4,0xB5,0xC4,0xB3,0xC5,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,
|
||||
/*Fx*/ 0xBF,0xCF,0xC0,0xC1,0xC2,0xC3,0xB6,0xB2,0xCC,0xCB,0xB7,0xC8,0xCD,0xC9,0xC7,0xCA,
|
||||
};
|
||||
PRIVATE char *koi8u_to_iso8859_5_p = (char*)koi8u_to_iso8859_5;
|
||||
|
||||
/* Translation cp1251.txt -> koi8u.txt */
|
||||
/* There are total 40 character unmap !! */
|
||||
PRIVATE unsigned char cp1251_to_koi8u[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Ax*/ 0x9A, '?', '?', '?', '?',0xBD, '?', '?',0xB3,0xBf,0xB4, '?', '?', '?', '?',0xB7,
|
||||
/*Bx*/ 0x9C, '?',0xB6,0xA6,0xAD, '?', '?',0x9E,0xA3, '?',0xA4, '?', '?', '?', '?',0xA7,
|
||||
/*Cx*/ 0xE1,0xE2,0xF7,0xE7,0xE4,0xE5,0xF6,0xFA,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,
|
||||
/*Dx*/ 0xF2,0xF3,0xF4,0xF5,0xE6,0xE8,0xE3,0xFE,0xFB,0xFD,0xFF,0xF9,0xF8,0xFC,0xE0,0xF1,
|
||||
/*Ex*/ 0xC1,0xC2,0xD7,0xC7,0xC4,0xC5,0xD6,0xDA,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,
|
||||
/*Fx*/ 0xD2,0xD3,0xD4,0xD5,0xC6,0xC8,0xC3,0xDE,0xDB,0xDD,0xDF,0xD9,0xD8,0xDC,0xC0,0xD1,
|
||||
};
|
||||
PRIVATE char *cp1251_to_koi8u_p = (char*)cp1251_to_koi8u;
|
||||
|
||||
/* Translation koi8u.txt -> cp1251.txt */
|
||||
/* There are total 40 character unmap !! */
|
||||
PRIVATE unsigned char koi8u_to_cp1251[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',0xA0, '?',0xB0, '?',0xB7, '?',
|
||||
/*Ax*/ '?', '?', '?',0xB8,0xBA, '?',0xB3,0xBF, '?', '?', '?', '?', '?',0xB4, '?', '?',
|
||||
/*Bx*/ '?', '?', '?',0xA8,0xAA, '?',0xB2,0xAF, '?', '?', '?', '?', '?',0xA5, '?',0xA9,
|
||||
/*Cx*/ 0xFE,0xE0,0xE1,0xF6,0xE4,0xE5,0xF4,0xE3,0xF5,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,
|
||||
/*Dx*/ 0xEF,0xFF,0xF0,0xF1,0xF2,0xF3,0xE6,0xE2,0xFC,0xFB,0xE7,0xF8,0xFD,0xF9,0xF7,0xFA,
|
||||
/*Ex*/ 0xDE,0xC0,0xC1,0xD6,0xC4,0xC5,0xD4,0xC3,0xD5,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,
|
||||
/*Fx*/ 0xCF,0xDF,0xD0,0xD1,0xD2,0xD3,0xC6,0xC2,0xDC,0xDB,0xC7,0xD8,0xDD,0xD9,0xD7,0xDA,
|
||||
};
|
||||
PRIVATE char *koi8u_to_cp1251_p = (char*)koi8u_to_cp1251;
|
||||
|
||||
/* Translation koi8u.txt -> koi8r.txt and koi8r.txt -> koi8u.txt */
|
||||
PRIVATE unsigned char koi8u_to_from_koi8r[] = {
|
||||
/*8x*/ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
|
||||
/*9x*/ 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
|
||||
/*Ax*/ 0xA0,0xA1,0xA2,0xA3, '?',0xA5, '?', '?',0xA8,0xA9,0xAA,0xAB,0xAC, '?',0xAE,0xAF,
|
||||
/*Bx*/ 0xB0,0xB1,0xB2,0xB3, '?',0xB5, '?', '?',0xB8,0xB9,0xBA,0xBB,0xBC, '?',0xBE,0xBF,
|
||||
/*Cx*/ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
|
||||
/*Dx*/ 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
|
||||
/*Ex*/ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
||||
/*Fx*/ 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
|
||||
};
|
||||
PRIVATE char *koi8u_to_from_koi8r_p = (char*)koi8u_to_from_koi8r;
|
||||
|
||||
/* Translation koi8u.txt -> maccyr.txt */
|
||||
/* There are total 46 character unmap !! */
|
||||
PRIVATE unsigned char koi8u_to_maccyr[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?',0xC3,0xC5,0xB2,0xB3,0xCA, '?',0xA1, '?', '?',0xD6,
|
||||
/*Ax*/ '?', '?', '?',0xDE,0xB9, '?',0xB4,0xBB, '?', '?', '?', '?', '?',0xB6, '?', '?',
|
||||
/*Bx*/ '?', '?', '?',0xDD,0xB8, '?',0xA7,0xBA, '?', '?', '?', '?', '?',0xA2, '?',0xA9,
|
||||
/*Cx*/ 0xFE,0xE0,0xE1,0xF6,0xE4,0xE5,0xF4,0xE3,0xF5,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,
|
||||
/*Dx*/ 0xEF,0xDF,0xF0,0xF1,0xF2,0xF3,0xE6,0xE2,0xFC,0xFB,0xE7,0xF8,0xFD,0xF9,0xF7,0xFA,
|
||||
/*Ex*/ 0x9E,0x80,0x81,0x96,0x84,0x85,0x94,0x83,0x95,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,
|
||||
/*Fx*/ 0x8F,0x9F,0x90,0x91,0x92,0x93,0x86,0x82,0x9C,0x9B,0x87,0x98,0x9D,0x99,0x97,0x9A,
|
||||
};
|
||||
PRIVATE char *koi8u_to_maccyr_p = (char*)koi8u_to_maccyr;
|
||||
|
||||
/* Translation maccyr.txt -> koi8u.txt */
|
||||
/* There are total 46 character unmap !! */
|
||||
PRIVATE unsigned char maccyr_to_koi8u[] = {
|
||||
/*8x*/ 0xE1,0xE2,0xF7,0xE7,0xE4,0xE5,0xF6,0xFA,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,
|
||||
/*9x*/ 0xF2,0xF3,0xF4,0xF5,0xE6,0xE8,0xE3,0xFE,0xFB,0xFD,0xFF,0xF9,0xF8,0xFC,0xE0,0xF1,
|
||||
/*Ax*/ '?',0x9C,0xBD, '?', '?', '?', '?',0xB6, '?',0xBF, '?', '?', '?', '?', '?', '?',
|
||||
/*Bx*/ '?', '?',0x98,0x99,0xA6, '?',0xAD, '?',0xB4,0xA4,0xB7,0xA7, '?', '?', '?', '?',
|
||||
/*Cx*/ '?', '?', '?',0x96, '?',0x97, '?', '?', '?', '?',0x9A, '?', '?', '?', '?', '?',
|
||||
/*Dx*/ '?', '?', '?', '?', '?', '?', '?',0x9F, '?', '?', '?', '?', '?', '?',0xB3,0xA3,
|
||||
/*Ex*/ 0xD1,0xC1,0xC2,0xD7,0xC7,0xC4,0xC5,0xD6,0xDA,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
|
||||
/*Fx*/ 0xD0,0xD2,0xD3,0xD4,0xD5,0xC6,0xC8,0xC3,0xDE,0xDB,0xDD,0xDF,0xD9,0xD8,0xDC,0xC0,
|
||||
};
|
||||
PRIVATE char *maccyr_to_koi8u_p = (char*)maccyr_to_koi8u;
|
||||
|
||||
/* Translation 8859-2 -> cp1250
|
||||
* There are 32 characters unmapped: 80 - 8F, 90 - 9F
|
||||
*/
|
||||
PRIVATE unsigned char iso8859_2_to_cp1250[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Ax*/ 0xA0,0xA5,0xA2,0xA3,0xA4,0xBC,0x8C,0xA7,0xA8,0x8A,0xAA,0x8D,0x8F,0xAD,0x8E,0xAF,
|
||||
/*Bx*/ 0xB0,0xB9,0xB2,0xB3,0xB4,0xBE,0x9C,0xA1,0xB8,0x9A,0xBA,0x9D,0x9F,0xBD,0x9E,0xBF,
|
||||
/*Cx*/ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
|
||||
/*Dx*/ 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
|
||||
/*Ex*/ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
||||
/*Fx*/ 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
|
||||
};
|
||||
PRIVATE char *iso8859_2_to_cp1250_p = (char*)iso8859_2_to_cp1250;
|
||||
|
||||
/* Translation cp1251 -> 8859-5
|
||||
* There are 32 characters unmapped:
|
||||
* 82, 84 - 89, 8B, 91 - 99, 9B, A4 - A6, A9, AB, AC, AE, B0, B1, B4 - B7, BB,
|
||||
*/
|
||||
PRIVATE unsigned char cp1251_to_iso8859_5[] = {
|
||||
/*8x*/ 0xA2,0xA3, '?',0xF3, '?', '?', '?', '?', '?', '?',0xA9, '?',0xAA,0xAC,0xAB,0xAF,
|
||||
/*9x*/ 0xF2, '?', '?', '?', '?', '?', '?', '?', '?', '?',0xF9, '?',0xFA,0xFC,0xFB,0xFF,
|
||||
/*Ax*/ 0xA0,0xAE,0xFE,0xA8, '?', '?', '?',0xFD,0xA1, '?',0xA4, '?', '?',0xAD, '?',0xA7,
|
||||
/*Bx*/ '?', '?',0xA6,0xF6, '?', '?', '?', '?',0xF1,0xF0,0xF4, '?',0xF8,0xA5,0xF5,0xF7,
|
||||
/*Cx*/ 0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
|
||||
/*Dx*/ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
|
||||
/*Ex*/ 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
|
||||
/*Fx*/ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
||||
};
|
||||
PRIVATE char *cp1251_to_iso8859_5_p = (char*)cp1251_to_iso8859_5;
|
||||
|
||||
/* Translation 8859-5 -> cp1251
|
||||
* There are 32 characters unmapped:
|
||||
* 80 - 8F, 90 - 9F
|
||||
*/
|
||||
PRIVATE unsigned char iso8859_5_to_cp1251[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Ax*/ 0xA0,0xA8,0x80,0x81,0xAA,0xBD,0xB2,0xAF,0xA3,0x8A,0x8C,0x8E,0x8D,0xAD,0xA1,0x8F,
|
||||
/*Bx*/ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
|
||||
/*Cx*/ 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
|
||||
/*Dx*/ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
||||
/*Ex*/ 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
|
||||
/*Fx*/ 0xB9,0xB8,0x90,0x83,0xBA,0xBE,0xB3,0xBF,0xBC,0x9A,0x9C,0x9E,0x9D,0xA7,0xA2,0x9F,
|
||||
};
|
||||
PRIVATE char *iso8859_5_to_cp1251_p = (char*)iso8859_5_to_cp1251;
|
||||
|
||||
/* Translation cp1253 -> 8859-7
|
||||
* There are 40 characters unmapped:
|
||||
* 80 - 8F, 90 - 9F, A4 - A5, AA, AE, B5 - B6, D2, FF
|
||||
*/
|
||||
PRIVATE unsigned char cp1253_to_iso8859_7[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Ax*/ 0xA0,0xB5,0xB6,0xA3, '?', '?',0xA6,0xA7,0xA8,0xA9, '?',0xAB,0xAC,0xAD, '?',0xAF,
|
||||
/*Bx*/ 0xB0,0xB1,0xB2,0xB3,0xB4, '?', '?',0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
|
||||
/*Cx*/ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
|
||||
/*Dx*/ 0xD0,0xD1, '?',0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
|
||||
/*Ex*/ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
||||
/*Fx*/ 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE, '?',
|
||||
};
|
||||
PRIVATE char *cp1253_to_iso8859_7_p = (char*)cp1253_to_iso8859_7;
|
||||
|
||||
/* Translation 8859-7 -> cp1253
|
||||
* There are 40 characters unmapped:
|
||||
* 80 - 8F, 90 - 9F, A1 - A2, A4 - A5, AA, AE, D2, FF
|
||||
*/
|
||||
PRIVATE unsigned char iso8859_7_to_cp1253[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Ax*/ 0xA0, '?', '?',0xA3, '?', '?',0xA6,0xA7,0xA8,0xA9, '?',0xAB,0xAC,0xAD, '?',0xAF,
|
||||
/*Bx*/ 0xB0,0xB1,0xB2,0xB3,0xB4,0xA1,0xA2,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
|
||||
/*Cx*/ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
|
||||
/*Dx*/ 0xD0,0xD1, '?',0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
|
||||
/*Ex*/ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
|
||||
/*Fx*/ 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE, '?',
|
||||
};
|
||||
PRIVATE char *iso8859_7_to_cp1253_p = (char*)iso8859_7_to_cp1253;
|
||||
|
||||
/* Translation cp1251.txt -> koi8r.txt */
|
||||
PRIVATE unsigned char cp1251_to_koi8r[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Ax*/ '?', '?', '?', '?', '?', '?', '?', '?',0xB3, '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Bx*/ '?', '?', '?', '?', '?', '?', '?', '?',0xA3, '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Cx*/ 0xE1,0xE2,0xF7,0xE7,0xE4,0xE5,0xF6,0xFA,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,
|
||||
/*Dx*/ 0xF2,0xF3,0xF4,0xF5,0xE6,0xE8,0xE3,0xFE,0xFB,0xFD,0xFF,0xF9,0xF8,0xFC,0xE0,0xF1,
|
||||
/*Ex*/ 0xC1,0xC2,0xD7,0xC7,0xC4,0xC5,0xD6,0xDA,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,
|
||||
/*Fx*/ 0xD2,0xD3,0xD4,0xD5,0xC6,0xC8,0xC3,0xDE,0xDB,0xDD,0xDF,0xD9,0xD8,0xDC,0xC0,0xD1,
|
||||
};
|
||||
PRIVATE char *cp1251_to_koi8r_p = (char*)cp1251_to_koi8r;
|
||||
|
||||
/* Translation koi8r.txt -> cp1251.txt */
|
||||
PRIVATE unsigned char koi8r_to_cp1251[] = {
|
||||
/*8x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*9x*/ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Ax*/ '?', '?', '?',0xB8, '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Bx*/ '?', '?', '?',0xA8, '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
|
||||
/*Cx*/ 0xFE,0xE0,0xE1,0xF6,0xE4,0xE5,0xF4,0xE3,0xF5,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,
|
||||
/*Dx*/ 0xEF,0xFF,0xF0,0xF1,0xF2,0xF3,0xE6,0xE2,0xFC,0xFB,0xE7,0xF8,0xFD,0xF9,0xF7,0xFA,
|
||||
/*Ex*/ 0xDE,0xC0,0xC1,0xD6,0xC4,0xC5,0xD4,0xC3,0xD5,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,
|
||||
/*Fx*/ 0xCF,0xDF,0xD0,0xD1,0xD2,0xD3,0xC6,0xC2,0xDC,0xDB,0xC7,0xD8,0xDD,0xD9,0xD7,0xDA,
|
||||
};
|
||||
PRIVATE char *koi8r_to_cp1251_p = (char*)koi8r_to_cp1251;
|
||||
|
||||
PUBLIC char **
|
||||
INTL_GetSingleByteTable(int16 from_csid, int16 to_csid, int32 resourceid)
|
||||
{
|
||||
/* LATIN1 */
|
||||
if ((from_csid == CS_LATIN1) && (to_csid == CS_LATIN1)) {
|
||||
return &cp1252_to_iso8859_1_p;
|
||||
}
|
||||
|
||||
/* LATIN2 */
|
||||
else if ((from_csid == CS_LATIN2) && (to_csid == CS_CP_1250)) {
|
||||
return &iso8859_2_to_cp1250_p;
|
||||
}
|
||||
else if ((from_csid == CS_CP_1250) && (to_csid == CS_LATIN2)) {
|
||||
return &cp1250_to_iso8859_2_p;
|
||||
}
|
||||
|
||||
/* CYRILLIC */
|
||||
else if ((from_csid == CS_8859_5) && (to_csid == CS_KOI8_R)) {
|
||||
return &iso8859_5_to_koi8r_p;
|
||||
}
|
||||
else if ((from_csid == CS_KOI8_R) && (to_csid == CS_8859_5)) {
|
||||
return &koi8r_to_iso8859_5_p;
|
||||
}
|
||||
else if ((from_csid == CS_8859_5) && (to_csid == CS_CP_1251)) {
|
||||
return &iso8859_5_to_cp1251_p;
|
||||
}
|
||||
else if ((from_csid == CS_CP_1251) && (to_csid == CS_8859_5)) {
|
||||
return &cp1251_to_iso8859_5_p;
|
||||
}
|
||||
else if ((from_csid == CS_CP_1251) && (to_csid == CS_KOI8_R)) {
|
||||
return &cp1251_to_koi8r_p;
|
||||
}
|
||||
else if ((from_csid == CS_KOI8_R) && (to_csid == CS_CP_1251)) {
|
||||
return &koi8r_to_cp1251_p;
|
||||
}
|
||||
|
||||
/* UKRAINIAN */
|
||||
else if ((from_csid == CS_KOI8_R) && (to_csid == CS_KOI8_U)) {
|
||||
return &koi8u_to_from_koi8r_p;
|
||||
}
|
||||
else if ((from_csid == CS_KOI8_U) && (to_csid == CS_KOI8_R)) {
|
||||
return &koi8u_to_from_koi8r_p;
|
||||
}
|
||||
else if ((from_csid == CS_8859_5) && (to_csid == CS_KOI8_U)) {
|
||||
return &iso8859_5_to_koi8u_p;
|
||||
}
|
||||
else if ((from_csid == CS_KOI8_U) && (to_csid == CS_8859_5)) {
|
||||
return &koi8u_to_iso8859_5_p;
|
||||
}
|
||||
else if ((from_csid == CS_KOI8_U) && (to_csid == CS_CP_1251)) {
|
||||
return &koi8u_to_cp1251_p;
|
||||
}
|
||||
else if ((from_csid == CS_CP_1251) && (to_csid == CS_KOI8_U)) {
|
||||
return &cp1251_to_koi8u_p;
|
||||
}
|
||||
else if ((from_csid == CS_MAC_CYRILLIC) && (to_csid == CS_KOI8_U)) {
|
||||
return &maccyr_to_koi8u_p;
|
||||
}
|
||||
else if ((from_csid == CS_KOI8_U) && (to_csid == CS_MAC_CYRILLIC)) {
|
||||
return &koi8u_to_maccyr_p;
|
||||
}
|
||||
|
||||
/* GREEK */
|
||||
else if ((from_csid == CS_8859_7) && (to_csid == CS_CP_1253)) {
|
||||
return &iso8859_7_to_cp1253_p;
|
||||
}
|
||||
else if ((from_csid == CS_CP_1253) && (to_csid == CS_8859_7)) {
|
||||
return &cp1253_to_iso8859_7_p;
|
||||
}
|
||||
|
||||
/* others To Be Implement */
|
||||
else
|
||||
return(NULL);
|
||||
}
|
||||
PUBLIC char *INTL_LockTable(char **cvthdl)
|
||||
{
|
||||
/* no need to lock as the tables are static */
|
||||
return *cvthdl;
|
||||
}
|
||||
PUBLIC void INTL_FreeSingleByteTable(char **cvthdl) {
|
||||
/* no need to free as the tables are static */
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
unsigned char *
|
||||
One2OneCCC (CCCDataObject obj, const unsigned char *s, int32 l)
|
||||
{
|
||||
char **cvthdl;
|
||||
register unsigned char *cp;
|
||||
char *pTable;
|
||||
|
||||
cvthdl = (char **)INTL_GetSingleByteTable(INTL_GetCCCFromCSID(obj), INTL_GetCCCToCSID(obj), INTL_GetCCCCvtflag(obj));
|
||||
|
||||
if (cvthdl != NULL)
|
||||
{
|
||||
pTable = INTL_LockTable(cvthdl);
|
||||
for (cp = (unsigned char *)s; cp < (unsigned char *)s + l; cp++)
|
||||
{
|
||||
if(*cp & 0x80)
|
||||
*cp = pTable[(*cp & 0x7F)];
|
||||
}
|
||||
}
|
||||
INTL_SetCCCLen(obj, l);
|
||||
INTL_FreeSingleByteTable(cvthdl);
|
||||
|
||||
return((unsigned char *)s);
|
||||
}
|
||||
|
||||
@ -1,760 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* sblower.c */
|
||||
/*
|
||||
This function contain the singlebyte to lower table which need to implement function in
|
||||
intlcomp.c.
|
||||
None of the function in this file should be made public
|
||||
The interface function is INTL_GetSingleByteToLowerMap() and it should only be called
|
||||
inside libi18n
|
||||
*/
|
||||
#include "intlpriv.h"
|
||||
#include "pintlcmp.h"
|
||||
|
||||
/*
|
||||
lower_lookup_ascii map
|
||||
0x41-0x5a to 0x61-0x7a
|
||||
*/
|
||||
MODULE_PRIVATE unsigned char lower_lookup_ascii[128]={
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
};
|
||||
#ifndef XP_MAC
|
||||
/*
|
||||
lower_lookup_latin1 map
|
||||
(2) 0xc0-0xd6 to 0xe0-0xf6
|
||||
(3) 0xd8-0xde to 0xf8-0xfe
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_latin1[128]={
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xd7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
/*
|
||||
lower_lookup_latin2 map
|
||||
(2) 0xa1 to 0xb1
|
||||
(3) 0xa3 to 0xb3
|
||||
(4) 0xa5-0xa6 to 0xb5-0xb6
|
||||
(5) 0xa9-0xac to 0xb9-0xbc
|
||||
(6) 0xae-0xaf to 0xbe-0xbf
|
||||
(7) 0xc0-0xd6 to 0xe0-0xf6
|
||||
(8) 0xd8-0xde to 0xf8-0xfe
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_latin2[128]={
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xb1, 0xa2, 0xb3, 0xa4, 0xb5, 0xb6, 0xa7, 0xa8, 0xb9, 0xba, 0xbb, 0xbc, 0xad, 0xbe, 0xbf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xd7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
/*
|
||||
lower_lookup_macicelandic map
|
||||
0x80 to 0x8a
|
||||
0x81-0x83 to 0x8c-0x8e
|
||||
0x84 to 0x96
|
||||
0x85 to 0x9a
|
||||
0x86 to 0x9f
|
||||
0xa0 to 0xe0
|
||||
0xae-0xaf to 0xbe-0xbf
|
||||
0xcb to 0x88
|
||||
0xcc to 0x8b
|
||||
0xcd to 0x9b
|
||||
0xce to 0xcf
|
||||
0xd9 to 0xd8
|
||||
0xdc to 0xdd
|
||||
0xde to 0xdf
|
||||
0xe5 to 0x89
|
||||
0xe6 to 0x90
|
||||
0xe7 to 0x87
|
||||
0xe8 to 0x91
|
||||
0xe9 to 0x8f
|
||||
0xea to 0x92
|
||||
0xeb to 0x94
|
||||
0xec to 0x95
|
||||
0xed to 0x93
|
||||
0xee to 0x97
|
||||
0xef to 0x99
|
||||
0xf1 to 0x98
|
||||
0xf2 to 0x9c
|
||||
0xf3 to 0x9e
|
||||
0xf4 to 0x9d
|
||||
*/
|
||||
#else /* ifndef XP_MAC */
|
||||
PRIVATE unsigned char lower_lookup_macicelandic[128]={
|
||||
0x8a, 0x8c, 0x8d, 0x8e, 0x96, 0x9a, 0x9f, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xe0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xbe, 0xbf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0x88, 0x8b, 0x9b, 0xcf, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd8, 0xda, 0xdb, 0xdd, 0xdd, 0xdf, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0x89, 0x90, 0x87, 0x91, 0x8f, 0x92, 0x94, 0x95, 0x93, 0x97, 0x99,
|
||||
0xf0, 0x98, 0x9c, 0x9e, 0x9d, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
/*
|
||||
lower_lookup_macce map
|
||||
0x80 to 0x8a
|
||||
0x81 to 0x82
|
||||
0x83 to 0x8e
|
||||
0x84 to 0x88
|
||||
0x85 to 0x9a
|
||||
0x86 to 0x9f
|
||||
0x89 to 0x8b
|
||||
0x8c to 0x8d
|
||||
0x8f to 0x90
|
||||
0x91 to 0x93
|
||||
0x94 to 0x95
|
||||
0x96 to 0x98
|
||||
0x9d to 0x9e
|
||||
0xa2 to 0xab
|
||||
0xaf to 0xb0
|
||||
0xb1 to 0xb4
|
||||
0xb5 to 0xfa
|
||||
0xb9 to 0xba
|
||||
0xbb to 0xbc
|
||||
0xbd to 0xbe
|
||||
0xbf to 0xc0
|
||||
0xc1 to 0xc4
|
||||
0xc5 to 0xcb
|
||||
0xcc to 0xce
|
||||
0xcd to 0x9b
|
||||
0xcf to 0xd8
|
||||
0xd9 to 0xda
|
||||
0xdb to 0xde
|
||||
0xdf to 0xe0
|
||||
0xe1 to 0xe4
|
||||
0xe5 to 0xe6
|
||||
0xe7 to 0x87
|
||||
0xe8 to 0xe9
|
||||
0xea to 0x92
|
||||
0xeb to 0xec
|
||||
0xed to 0xf0
|
||||
0xee to 0x97
|
||||
0xef to 0x99
|
||||
0xf1 to 0xf3
|
||||
0xf2 to 0x9c
|
||||
0xf4 to 0xf5
|
||||
0xf6 to 0xf7
|
||||
0xf8 to 0xf9
|
||||
0xfb to 0xfd
|
||||
0xfc to 0xb8
|
||||
0xfe to 0xae
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_macce[128]={
|
||||
0x8a, 0x82, 0x82, 0x8e, 0x88, 0x9a, 0x9f, 0x87, 0x88, 0x8b, 0x8a, 0x8b, 0x8d, 0x8d, 0x8e, 0x90,
|
||||
0x90, 0x93, 0x92, 0x93, 0x95, 0x95, 0x98, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xab, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xae, 0xae, 0xb0,
|
||||
0xb0, 0xb4, 0xb2, 0xb3, 0xb4, 0xfa, 0xb6, 0xb7, 0xb8, 0xba, 0xba, 0xbc, 0xbc, 0xbe, 0xbe, 0xc0,
|
||||
0xc0, 0xc4, 0xc2, 0xc3, 0xc4, 0xcb, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xce, 0x9b, 0xce, 0xd8,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xda, 0xda, 0xde, 0xdc, 0xdd, 0xde, 0xe0,
|
||||
0xe0, 0xe4, 0xe2, 0xe3, 0xe4, 0xe6, 0xe6, 0x87, 0xe9, 0xe9, 0x92, 0xec, 0xec, 0xf0, 0x97, 0x99,
|
||||
0xf0, 0xf3, 0x9c, 0xf3, 0xf5, 0xf5, 0xf7, 0xf7, 0xf9, 0xf9, 0xfa, 0xfd, 0xb8, 0xfd, 0xae, 0xff
|
||||
};
|
||||
#endif /* ifndef XP_MAC */
|
||||
|
||||
#ifndef XP_UNIX
|
||||
/*
|
||||
lower_lookup_jis0201 map
|
||||
0xa7-0xab to 0xb1-0xb5
|
||||
0xac-0xae to 0xd4-0xd6
|
||||
0xaf to 0xc2
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_jis0201[128]={
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xd4, 0xd5, 0xd6, 0xc2,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef XP_MAC
|
||||
/*
|
||||
lower_lookup_mac_cyrillic
|
||||
0x80-0x9e to 0xe0-0xfe A - YU
|
||||
0x9F to 0xDF YA
|
||||
0xA7 to 0xb4 BYELORUSSIAN-UKRAINIAN I
|
||||
0xAb to 0xAC DJE
|
||||
0xae to 0xaf gje
|
||||
0xb7 to 0xc0 je
|
||||
0xb8 to 0xb9 ie
|
||||
0xba to 0xbb yi
|
||||
0xbc to 0xbc lje
|
||||
0xbd to 0xbd nje
|
||||
0xc1 to 0xcf dze
|
||||
0xcb to 0xcc tshe
|
||||
0xcd to 0xce kje
|
||||
0xd8 to 0xd9 short u
|
||||
0xda to 0xdb dzhe
|
||||
0xdd to 0xde dzhe
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_mac_cyrillic[128]={
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xb4, 0xa8, 0xa9, 0xaa, 0xac, 0xac, 0xad, 0xaf, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xc0, 0xb9, 0xb9, 0xbb, 0xbb, 0xbd, 0xbd, 0xbf, 0xbf,
|
||||
0xc0, 0xcf, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcc, 0xcc, 0xce, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd9, 0xd9, 0xdb, 0xdb, 0xdc, 0xde, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
#endif
|
||||
#ifdef XP_UNIX
|
||||
/*
|
||||
lower_lookup_8859_5 map
|
||||
0xa1-0xac to 0xf1-0xfc
|
||||
0xae-0xaf to 0xfe-0xff
|
||||
0xb0-0xcf to 0xd0-0xef
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_8859_5[128]={
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xad, 0xfe, 0xff,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
#endif
|
||||
#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_UNIX)
|
||||
/*
|
||||
lower_lookup_cp1251 map
|
||||
0x80 0x90
|
||||
0x81 0x83
|
||||
0x8a 0x9a
|
||||
0x8c-0x8f 0x9c-0x9f
|
||||
0xa1 0xa2
|
||||
0xa3 0xbc
|
||||
0xa5 0xb4
|
||||
0xa8 0xb8
|
||||
0xaa 0xba
|
||||
0xaf 0xbf
|
||||
0xb2 0xb3
|
||||
0xbd 0xbe
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_cp1251[128]={
|
||||
0x90, 0x83, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x9a, 0x8b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa2, 0xa2, 0xbc, 0xa4, 0xb4, 0xa6, 0xa7, 0xb8, 0xa9, 0xba, 0xab, 0xac, 0xad, 0xae, 0xbf,
|
||||
0xb0, 0xb1, 0xb3, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbe, 0xbe, 0xbf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
#endif
|
||||
#ifdef XP_MAC
|
||||
/*
|
||||
lower_lookup_mac_greek map
|
||||
0x80 to 0x8a
|
||||
0x8e to 0x8e
|
||||
0x85 to 0x9a
|
||||
0x86 to 0x9f
|
||||
0xa1 to 0xe7
|
||||
0xa2 to 0xe4
|
||||
0xa3 to 0xf5
|
||||
0xa4 to 0xec
|
||||
0xa5 to 0xea
|
||||
0xa6 to 0xf0
|
||||
0xaa to 0xf3
|
||||
0xab to 0xfb
|
||||
0xb0 to 0xe1
|
||||
0xb5 to 0xe2
|
||||
0xb6 to 0xe5
|
||||
0xb7 to 0xfa
|
||||
0xb8 to 0xe8
|
||||
0xb9 to 0xe9
|
||||
0xba to 0xeb
|
||||
0xbb to 0xed
|
||||
0xbc to 0xe6
|
||||
0xbd to 0xfc
|
||||
0xbe to 0xe3
|
||||
0xbf to 0xf6
|
||||
0xc1 to 0xee
|
||||
0xc3 to 0xef
|
||||
0xc4 to 0xf2
|
||||
0xc6 to 0xf4
|
||||
0xcb to 0xf9
|
||||
0xcc to 0xf8
|
||||
0xcd to 0xc0
|
||||
0xce to 0xdb
|
||||
|
||||
0xd7-0xd9 to 0xdc-0xde
|
||||
0xda to 0xe0
|
||||
0xdf to 0xf1
|
||||
|
||||
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_mac_greek[128]={
|
||||
0x8a, 0x81, 0x82, 0x8e, 0x84, 0x9a, 0x9f, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xe7, 0xe4, 0xf5, 0xec, 0xea, 0xf0, 0xa7, 0xa8, 0xa9, 0xf3, 0xfb, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xe1, 0xb1, 0xb2, 0xb3, 0xb4, 0xe2, 0xe5, 0xfa, 0xe8, 0xe9, 0xeb, 0xed, 0xe6, 0xfc, 0xe3, 0xf6,
|
||||
0xc0, 0xee, 0xc2, 0xef, 0xf2, 0xc5, 0xf4, 0xc7, 0xc8, 0xc9, 0xca, 0xf9, 0xf8, 0xc0, 0xdb, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xdc, 0xdd, 0xde, 0xe0, 0xdb, 0xdc, 0xdd, 0xde, 0xf1,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
#endif
|
||||
#ifdef XP_UNIX
|
||||
/*
|
||||
lower_lookup_8859_7 map
|
||||
0xb6 to 0xdc
|
||||
0xb8-0xba to 0xdd-0xdf
|
||||
0xbc to 0xfc
|
||||
0xbe-0xbf to 0xfd-0xfe
|
||||
0xc1-0xdb to 0xe1-0xfb
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_8859_7[128]={
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xdc, 0xb7, 0xdd, 0xde, 0xdf, 0xbb, 0xfc, 0xbd, 0xfd, 0xfe,
|
||||
0xc0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
#endif
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
/*
|
||||
( The differences in these two table. I am not saying the difference between these two codeset)
|
||||
is 0xb6 and 0xa2
|
||||
lower_lookup_cp1253 map
|
||||
0xa2 to 0xdc
|
||||
0xb8-0xba to 0xdd-0xdf
|
||||
0xbc to 0xfc
|
||||
0xbe-0xbf to 0xfd-0xfe
|
||||
0xc1-0xdb to 0xe1-0xfb
|
||||
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_cp1253[128]={
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xdc, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xdd, 0xde, 0xdf, 0xbb, 0xfc, 0xbd, 0xfd, 0xfe,
|
||||
0xc0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
/*
|
||||
lower_lookup_cp1252 map
|
||||
(2) 0xc0-0xd6 to 0xe0-0xf6
|
||||
(3) 0xd8-0xde to 0xf8-0xfe
|
||||
(4) 0x8a to 0x9a s with caron
|
||||
(5) 0x8c to 0x9c oe ligature
|
||||
(6) 0x8e to 0x9e z with caron
|
||||
(7) 0x9f to 0xff y with diaeresis
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_cp1252[128]={
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x9a, 0x8b, 0x9c, 0x8d, 0x9e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0xff,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xd7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
/*
|
||||
lower_lookup_cp1250 map
|
||||
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_cp1250[128]={
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x9a, 0x8b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xb3, 0xa4, 0xb9, 0xa6, 0xa7, 0xa8, 0xa9, 0xba, 0xab, 0xac, 0xad, 0xae, 0xbf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbe, 0xbd, 0xbe, 0xbf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xd7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
#endif
|
||||
#ifndef XP_MAC
|
||||
/*
|
||||
lower_lookup_8859_9 map
|
||||
|
||||
PROBLEM!!!!! Need more information !!!!
|
||||
Currently I map 0xdd to 0xfd for tolower
|
||||
0xDD is LATIN CAPITAL LETTER I WITH DOT ABOVE
|
||||
0xFD is LATIN SMALL LETTER DOTLESS I
|
||||
|
||||
Should I do that ?
|
||||
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_8859_9[128]={
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x9a, 0x8b, 0x9c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0xff,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xd7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
#else
|
||||
/*
|
||||
lower_lookup_mac_turkish map
|
||||
PROBLEM!!!!! Need more information !!!!
|
||||
Currently I map 0xdc to 0xdd for tolower
|
||||
0xDC is LATIN CAPITAL LETTER I WITH DOT ABOVE
|
||||
0xDD is LATIN SMALL LETTER DOTLESS I
|
||||
|
||||
Should I do that ?
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_mac_turkish[128]={
|
||||
0x8a, 0x8c, 0x8d, 0x8e, 0x96, 0x9a, 0x9f, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xbe, 0xbf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0x88, 0xcb, 0x9b, 0xcf, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd8, 0xdb, 0xdb, 0xdd, 0xdd, 0xdf, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0x89, 0x90, 0x87, 0x91, 0x8f, 0x92, 0x94, 0x95, 0x93, 0x97, 0x99,
|
||||
0xf0, 0x98, 0x9c, 0x9e, 0x9d, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
#endif
|
||||
/*
|
||||
lower_lookup_koi8_r map
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_koi8_r[128]={
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb1, 0xa3, 0xa4, 0xb5, 0xa6, 0xa7, 0xb8, 0xb9, 0xba, 0xbb, 0xbd, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf
|
||||
};
|
||||
/*
|
||||
* lower_lookup_koi8_u map
|
||||
*/
|
||||
PRIVATE unsigned char lower_lookup_koi8_u[128]={
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xa3, 0xa4, 0xb5, 0xa6, 0xa7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xad, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf
|
||||
};
|
||||
|
||||
#ifdef XP_OS2
|
||||
/*
|
||||
* Lowercase for ibm850
|
||||
*/
|
||||
PRIVATE unsigned char lower_cp850[128] = {
|
||||
0x87, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x84, 0x86,
|
||||
0x82, 0x91, 0x91, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x94, 0x81, 0x9b, 0x9c, 0x9b, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa4, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xa0, 0x83, 0x85, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd0, 0x88, 0x89, 0x8a, 0xd5, 0xa1, 0x8c, 0x8b, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0x8d, 0xdf,
|
||||
0xa2, 0xe1, 0x93, 0x95, 0xe4, 0xe4, 0xe6, 0xe7, 0xe7, 0xa3, 0x96, 0x97, 0xec, 0xec, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
};
|
||||
|
||||
/*
|
||||
* Lowercase for ibm852
|
||||
*/
|
||||
PRIVATE unsigned char lower_cp852[128] = {
|
||||
0x87, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8b, 0x8b, 0x8c, 0xab, 0x84, 0x86,
|
||||
0x82, 0x92, 0x92, 0x93, 0x94, 0x96, 0x96, 0x98, 0x98, 0x94, 0x81, 0x9c, 0x9c, 0x88, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa5, 0xa5, 0xa7, 0xa7, 0xa9, 0xa9, 0x7f, 0xab, 0x9f, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xa0, 0x83, 0xd8, 0xad, 0xb9, 0xba, 0xbb, 0xbc, 0xbe, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc7, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd0, 0xd4, 0x89, 0xd4, 0xe5, 0xa1, 0x8c, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xee, 0x85, 0xdf,
|
||||
0xa2, 0xe1, 0x93, 0xe4, 0xe4, 0xe5, 0xe7, 0xe7, 0xea, 0xa3, 0xea, 0xfb, 0xec, 0xec, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfd, 0xfd, 0xfe, 0xff,
|
||||
};
|
||||
|
||||
/*
|
||||
* Lowercase for ibm855
|
||||
*/
|
||||
PRIVATE unsigned char lower_cp855[128] = {
|
||||
0x80, 0x80, 0x82, 0x82, 0x84, 0x84, 0x86, 0x86, 0x88, 0x88, 0x8a, 0x8a, 0x8c, 0x8c, 0x8e, 0x8e,
|
||||
0x90, 0x90, 0x92, 0x92, 0x94, 0x94, 0x96, 0x96, 0x98, 0x98, 0x9a, 0x9a, 0x9c, 0x9c, 0x9e, 0x9e,
|
||||
0xa0, 0xa0, 0xa2, 0xa2, 0xa4, 0xa4, 0xa6, 0xa6, 0xa8, 0xa8, 0xaa, 0xaa, 0xac, 0xac, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb5, 0xb7, 0xb7, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbd, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd0, 0xd2, 0xd2, 0xd4, 0xd4, 0xd6, 0xd6, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xd8, 0xde, 0xdf,
|
||||
0xde, 0xe1, 0xe1, 0xe3, 0xe3, 0xe5, 0xe5, 0xe7, 0xe7, 0xe9, 0xe9, 0xeb, 0xeb, 0xed, 0xed, 0xef,
|
||||
0xf0, 0xf1, 0xf1, 0xf3, 0xf3, 0xf5, 0xf5, 0xf7, 0xf7, 0xf9, 0xf9, 0xfb, 0xfb, 0xfd, 0xfe, 0xff, };
|
||||
|
||||
/*
|
||||
* Lowercase for ibm857
|
||||
*/
|
||||
PRIVATE unsigned char lower_cp857[128] = {
|
||||
0x87, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x84, 0x86,
|
||||
0x82, 0x91, 0x91, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x94, 0x81, 0x9b, 0x9c, 0x9b, 0x9f, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa4, 0xa7, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xa0, 0x83, 0x85, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc6, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0x88, 0x89, 0x8a, 0x7f, 0xa1, 0x8c, 0x8b, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xec, 0xdf,
|
||||
0xa2, 0xe1, 0x93, 0x95, 0xe4, 0xe4, 0xe6, 0x7f, 0xe8, 0xa3, 0x96, 0x97, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0x7f, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, };
|
||||
|
||||
/*
|
||||
* Lowercase for ibm862
|
||||
*/
|
||||
PRIVATE unsigned char lower_cp862[128] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa4, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0x7f, 0xe3, 0xe5, 0xe5, 0xe6, 0xe7, 0xed, 0x7f, 0x7f, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Lowercase for ibm864
|
||||
*/
|
||||
PRIVATE unsigned char lower_cp864[128] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x7f, 0x7f, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0x7f, 0x7f, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x7f, };
|
||||
|
||||
|
||||
/*
|
||||
* Lowercase for ibm866
|
||||
*/
|
||||
PRIVATE unsigned char lower_cp866[128] = {
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf1, 0xf1, 0xf3, 0xf3, 0xf5, 0xf5, 0xf7, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, };
|
||||
|
||||
/*
|
||||
* Lowercase for windows-1257
|
||||
*/
|
||||
PRIVATE unsigned char lower_cp1257[128] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0x1a, 0xa2, 0xa3, 0xa4, 0x1a, 0xa6, 0xa7, 0xb8, 0xa9, 0xba, 0xab, 0xac, 0xad, 0xae, 0xbf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0x1a, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xd7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x1a, };
|
||||
|
||||
|
||||
/*
|
||||
* Lowercase for macroman
|
||||
*/
|
||||
PRIVATE unsigned char lower_macroman[128] = {
|
||||
0x8a, 0x8c, 0x8d, 0x8e, 0x96, 0x9a, 0x9f, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xe0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xbe, 0xbf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0x88, 0x8b, 0x9b, 0xcf, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd8, 0xda, 0xdb, 0xdd, 0xdd, 0xdf, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0x89, 0x90, 0x87, 0x91, 0x8f, 0x92, 0x94, 0x95, 0x93, 0x97, 0x99,
|
||||
0xf0, 0x98, 0x9c, 0x9e, 0x9d, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
ToLower translation for Armenian (ArmSCII-8):
|
||||
|
||||
0x80..0xB1 - unchanged
|
||||
0xB2..0xFE - set the lower bit
|
||||
*/
|
||||
|
||||
PRIVATE unsigned char lower_armscii8[128] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb3, 0xb3, 0xb5, 0xb5, 0xb7, 0xb7, 0xb9, 0xb9, 0xbb, 0xbb, 0xbd, 0xbd, 0xbf, 0xbf,
|
||||
0xc0, 0xc1, 0xc3, 0xc3, 0xc5, 0xc5, 0xc7, 0xc7, 0xc9, 0xc9, 0xcb, 0xcb, 0xcd, 0xcd, 0xcf, 0xcf,
|
||||
0xd0, 0xd1, 0xd3, 0xd3, 0xd5, 0xd5, 0xd7, 0xd7, 0xd9, 0xd9, 0xdb, 0xdb, 0xdd, 0xdd, 0xdf, 0xdf,
|
||||
0xe0, 0xe1, 0xe3, 0xe3, 0xe5, 0xe5, 0xe7, 0xe7, 0xe9, 0xe9, 0xeb, 0xeb, 0xed, 0xed, 0xef, 0xef,
|
||||
0xf0, 0xf1, 0xf3, 0xf3, 0xf5, 0xf5, 0xf7, 0xf7, 0xf9, 0xf9, 0xfb, 0xfb, 0xfd, 0xfd, 0xff, 0x7f };
|
||||
|
||||
PRIVATE unsigned char lower_viet_viscii[128] = {
|
||||
0xd5, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb5, 0xfe, 0xbe, 0xb6, 0xb7, 0xb8, 0xf6, 0xf7, 0xef, 0xfc, 0xfb, 0xf8, 0xcf,
|
||||
0xf5, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xde, 0xbd, 0xb5, 0xb6, 0xb7, 0xb8, 0xf1, 0xd1, 0xd7, 0xd8, 0xbd, 0xbe, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xc6, 0xc7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xcf,
|
||||
0xf0, 0xd1, 0xf2, 0xf3, 0xf4, 0xd5, 0xd6, 0xd7, 0xd8, 0xf9, 0xfa, 0xdb, 0xdc, 0xfd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xe6 };
|
||||
|
||||
PRIVATE unsigned char lower_viet_vps[128] = {
|
||||
0xe0, 0xe4, 0xe3, 0xc3, 0xc0, 0xc4, 0x86, 0x87, 0xe6, 0x89, 0x8a, 0x8b, 0x8c, 0xa1, 0xa2, 0xa3,
|
||||
0x89, 0x91, 0x92, 0x8a, 0x8b, 0xcd, 0xd3, 0xd2, 0xb0, 0x87, 0x9a, 0x9b, 0x9c, 0xa7, 0xa9, 0xaa,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xab, 0xa7, 0xf9, 0xa9, 0xaa, 0xab, 0xdb, 0xd9, 0xae, 0xd8,
|
||||
0xb0, 0xba, 0xff, 0xcf, 0xed, 0xec, 0xb6, 0xcc, 0xef, 0xf3, 0xba, 0xbb, 0xf2, 0xd5, 0xf5, 0xbf,
|
||||
0xc0, 0xe1, 0xe2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xe9, 0xea, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xde, 0xfb, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xe8, 0xd8, 0xd9, 0xfa, 0xdb, 0xdc, 0x9a, 0xc8, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xa4, 0xc7, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x9b, 0xeb, 0xff };
|
||||
|
||||
PRIVATE unsigned char lower_viet_tcvn[128] = {
|
||||
0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xc6, 0xcb, 0xcc, 0xce, 0xcf, 0xd0, 0xd1, 0xd6, 0xd7, 0xd8, 0xdc,
|
||||
0xdd, 0xde, 0xdf, 0xe1, 0xe2, 0xe3, 0xe4, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf1, 0xf2,
|
||||
0xa0, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xbb,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xbc, 0xbb, 0xbc, 0xbd, 0xbe, 0xbd,
|
||||
0xbe, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xd3, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd4, 0xd5, 0xe5, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe6, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xe7, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xe8 };
|
||||
|
||||
MODULE_PRIVATE unsigned char *INTL_GetSingleByteToLowerMap(int16 csid)
|
||||
{
|
||||
switch(csid)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
case CS_MAC_ROMAN:
|
||||
return lower_lookup_macicelandic;
|
||||
case CS_MAC_CE:
|
||||
return lower_lookup_macce;
|
||||
case CS_MAC_CYRILLIC:
|
||||
return lower_lookup_mac_cyrillic;
|
||||
case CS_MAC_GREEK:
|
||||
return lower_lookup_mac_greek;
|
||||
case CS_MAC_TURKISH:
|
||||
return lower_lookup_mac_turkish;
|
||||
case CS_SJIS:
|
||||
return lower_lookup_jis0201;
|
||||
#endif
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
case CS_LATIN1:
|
||||
return lower_lookup_cp1252; /* on window, change to cp1252 form latin1 */
|
||||
case CS_CP_1250:
|
||||
return lower_lookup_cp1250;
|
||||
case CS_CP_1251:
|
||||
return lower_lookup_cp1251;
|
||||
case CS_CP_1253:
|
||||
return lower_lookup_cp1253;
|
||||
#ifdef XP_OS2
|
||||
case CS_CP_1254:
|
||||
#endif
|
||||
case CS_8859_9:
|
||||
return lower_lookup_8859_9;
|
||||
case CS_SJIS:
|
||||
return lower_lookup_jis0201;
|
||||
#ifdef XP_OS2
|
||||
case CS_CP_850:
|
||||
return lower_cp850;
|
||||
case CS_CP_852:
|
||||
return lower_cp852;
|
||||
case CS_CP_855:
|
||||
return lower_cp855;
|
||||
case CS_CP_857:
|
||||
return lower_cp857;
|
||||
case CS_CP_862:
|
||||
return lower_cp862;
|
||||
case CS_CP_864:
|
||||
return lower_cp864;
|
||||
case CS_CP_866:
|
||||
return lower_cp866;
|
||||
case CS_CP_1257:
|
||||
return lower_cp1257;
|
||||
case CS_MAC_ROMAN:
|
||||
return lower_macroman;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef XP_UNIX
|
||||
case CS_LATIN1:
|
||||
return lower_lookup_latin1;
|
||||
case CS_LATIN2:
|
||||
return lower_lookup_latin2;
|
||||
case CS_8859_5:
|
||||
return lower_lookup_8859_5;
|
||||
case CS_8859_7:
|
||||
return lower_lookup_8859_7;
|
||||
case CS_8859_9:
|
||||
return lower_lookup_8859_9;
|
||||
case CS_CP_1251:
|
||||
return lower_lookup_cp1251;
|
||||
#endif
|
||||
case CS_KOI8_R:
|
||||
return lower_lookup_koi8_r;
|
||||
case CS_KOI8_U:
|
||||
return lower_lookup_koi8_u;
|
||||
case CS_ARMSCII8:
|
||||
return lower_armscii8;
|
||||
|
||||
case CS_VIET_VISCII:
|
||||
return lower_viet_viscii;
|
||||
case CS_VIET_VPS:
|
||||
return lower_viet_vps;
|
||||
case CS_VIET_TCVN:
|
||||
return lower_viet_tcvn;
|
||||
|
||||
/* currently, return the ascii table. We should supply table for this csid later */
|
||||
|
||||
case CS_8859_3:
|
||||
case CS_8859_4:
|
||||
case CS_8859_6:
|
||||
case CS_8859_8:
|
||||
case CS_SYMBOL:
|
||||
case CS_DINGBATS:
|
||||
case CS_TIS620:
|
||||
case CS_JISX0201:
|
||||
|
||||
/* use the ascii table */
|
||||
case CS_DEFAULT:
|
||||
case CS_ASCII:
|
||||
case CS_BIG5:
|
||||
case CS_CNS_8BIT:
|
||||
case CS_GB_8BIT:
|
||||
case CS_KSC_8BIT:
|
||||
default:
|
||||
return lower_lookup_ascii;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,174 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* sjis2euc.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
|
||||
|
||||
extern int MK_OUT_OF_MEMORY;
|
||||
|
||||
|
||||
/* SJIS to EUC Algorithm. */
|
||||
#define TwoByteSJIS2EUC(sjisp, eucp, offset) { \
|
||||
*eucp = ((*sjisp++ - offset) << 1) | 0x80; /* 1st EUC byte */ \
|
||||
if (*sjisp < 0x9F) { /* check 2nd SJIS byte */ \
|
||||
*eucp++ -= 1; /* adjust 1st EUC byte */ \
|
||||
if (*sjisp > 0x7F) \
|
||||
*eucp++ = (*sjisp++ - 0x20) | 0x80; \
|
||||
else \
|
||||
*eucp++ = (*sjisp++ - 0x1F) | 0x80; \
|
||||
} else { \
|
||||
eucp++; \
|
||||
*eucp++ = (*sjisp++ - 0x7E) | 0x80; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* net_sjis2euc(sjisbuf, sjisbufsz)
|
||||
* Args:
|
||||
* sjisbuf: Ptr to a buf of SJIS chars
|
||||
* sjisbufsz: Size in bytes of sjisbuf
|
||||
* uncvtbuf: If entire buffer was converted, uncvtbuf[0] will be nul,
|
||||
* else this points to SJIS chars that were NOT converted
|
||||
* and mz_sjis2euc() with additional SJIS chars appended.
|
||||
* Return:
|
||||
* Returns NULL on failure, otherwise it returns a pointer to a buffer of
|
||||
* converted SJIS characters. Caller must XP_FREE() this memory.
|
||||
*
|
||||
* Description:
|
||||
* Allocate destination EUC buffer.
|
||||
*
|
||||
* If byte in ASCII range, just copy it to EUC buffer.
|
||||
* If Half-width SJIS katakana (1 byte), convert to Half-width EUC katakana.
|
||||
* If 2-byte SJIS, convert to 2-byte EUC.
|
||||
* Otherwise assume user-defined SJIS, just copy 2 bytes.
|
||||
*
|
||||
* If either SJIS buffer does not contain complete SJIS char or EUC buffer
|
||||
* is full, then return unconverted SJIS to caller. Caller should
|
||||
* append more data and recall mz_sjis2euc.
|
||||
*/
|
||||
|
||||
|
||||
MODULE_PRIVATE unsigned char *
|
||||
mz_sjis2euc( CCCDataObject obj,
|
||||
const unsigned char *sjisbuf, /* SJIS buf for conversion */
|
||||
int32 sjisbufsz) /* SJIS buf size in bytes */
|
||||
{
|
||||
unsigned char *tobuf = NULL;
|
||||
int32 tobufsz;
|
||||
register unsigned char *sjisp, *tobufp; /* current byte in bufs */
|
||||
register unsigned char *sjisep, *tobufep; /* end of buffers */
|
||||
int32 uncvtlen;
|
||||
unsigned char *uncvtbuf = INTL_GetCCCUncvtbuf(obj);
|
||||
|
||||
/* Allocate a EUC buffer: */
|
||||
/* In the worst case ( all Half-width Kanas ), the converted */
|
||||
/* EUC will be 2X the size of the SJIS + 1 for nul byte */
|
||||
uncvtlen = strlen((char *)uncvtbuf);
|
||||
tobufsz = ((sjisbufsz + uncvtlen) << 1) + 1;
|
||||
if ((tobuf = (unsigned char *)XP_ALLOC(tobufsz)) == (unsigned char *)NULL) {
|
||||
INTL_SetCCCRetval(obj, MK_OUT_OF_MEMORY);
|
||||
return(NULL);
|
||||
}
|
||||
/* Initialize pointers, etc. */
|
||||
sjisp = (unsigned char *)sjisbuf;
|
||||
sjisep = sjisp + sjisbufsz - 1;
|
||||
|
||||
#define uncvtp tobufp /* use tobufp as temp */
|
||||
/* If prev. unconverted chars, append unconverted
|
||||
* chars w/new chars and try to process.
|
||||
*/
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
uncvtp = uncvtbuf + uncvtlen;
|
||||
while (uncvtp < (uncvtbuf + UNCVTBUF_SIZE) &&
|
||||
sjisp <= sjisep)
|
||||
*uncvtp++ = *sjisp++;
|
||||
*uncvtp = '\0'; /* nul terminate */
|
||||
sjisp = uncvtbuf; /* process unconverted first */
|
||||
sjisep = uncvtp - 1;
|
||||
}
|
||||
#undef uncvtp
|
||||
|
||||
tobufp = tobuf;
|
||||
tobufep = tobufp + tobufsz - 1; /* save space for terminating null */
|
||||
|
||||
WHILELOOP:
|
||||
/* While SJIS data && space in EUC buf. */
|
||||
while ((sjisp <= sjisep) && (tobufp <= tobufep)) {
|
||||
if (*sjisp < 0x80) {
|
||||
/* ASCII/JIS-Roman */
|
||||
*tobufp++ = *sjisp++;
|
||||
|
||||
} else if (*sjisp < 0xA0) {
|
||||
/* 1st byte of 2-byte low SJIS. */
|
||||
if (sjisp+1 > sjisep) /* No 2nd byte in SJIS buffer? */
|
||||
break;
|
||||
|
||||
TwoByteSJIS2EUC(sjisp, tobufp, 0x70);
|
||||
|
||||
} else if (*sjisp==0xA0) {
|
||||
/* SJIS half-width space. */
|
||||
/* Just treat like Roman?? */
|
||||
*tobufp++ = *sjisp++;
|
||||
|
||||
} else if (*sjisp < 0xE0) {
|
||||
/* SJIS half-width katakana */
|
||||
*tobufp++ = SS2;
|
||||
*tobufp++ = *sjisp | 0x80; /* Set 8th bit for EUC & SJIS */
|
||||
sjisp++;
|
||||
|
||||
} else if (*sjisp < 0xF0) {
|
||||
/* 1st byte of 2-byte high SJIS */
|
||||
if (sjisp+1 > sjisep) /* No 2nd byte in SJIS buffer? */
|
||||
break;
|
||||
|
||||
TwoByteSJIS2EUC(sjisp, tobufp, 0xB0);
|
||||
} else {
|
||||
/* User Defined SJIS: copy bytes */
|
||||
if (sjisp+1 > sjisep) /* No 2nd byte in SJIS buf? */
|
||||
break;
|
||||
|
||||
*tobufp++ = *sjisp++; /* Just copy 2 bytes. */
|
||||
*tobufp++ = *sjisp++;
|
||||
}
|
||||
}
|
||||
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
/* jisp pts to 1st unprocessed char in
|
||||
* jisbuf. Some may have been processed
|
||||
* while processing unconverted chars,
|
||||
* so set up ptrs not to process them
|
||||
* twice.
|
||||
*/
|
||||
sjisp = (unsigned char *)sjisbuf + (sjisp - uncvtbuf - uncvtlen);
|
||||
sjisep = (unsigned char *)sjisbuf + sjisbufsz - 1;
|
||||
uncvtbuf[0] = '\0'; /* No more uncoverted chars. */
|
||||
goto WHILELOOP; /* Process new data */
|
||||
}
|
||||
|
||||
*tobufp = '\0'; /* null terminate EUC data */
|
||||
INTL_SetCCCLen(obj, tobufp - tobuf); /* length not counting null */
|
||||
|
||||
if (sjisp <= sjisep) { /* uncoverted SJIS? */
|
||||
tobufp = uncvtbuf; /* reuse the tobufp as a TEMP */
|
||||
while (sjisp <= sjisep)
|
||||
*tobufp++ = *sjisp++;
|
||||
*tobufp = '\0'; /* null terminate */
|
||||
}
|
||||
return(tobuf);
|
||||
}
|
||||
|
||||
@ -1,237 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/* sjis2jis.c */
|
||||
|
||||
#include "intlpriv.h"
|
||||
#if defined(MOZ_MAIL_NEWS)
|
||||
#include "katakana.h"
|
||||
#endif
|
||||
|
||||
extern int MK_OUT_OF_MEMORY;
|
||||
|
||||
|
||||
/* SJIS to JIS Algorithm. */
|
||||
#define TwoByteSJIS2JIS(sjisp, jisp, offset) { \
|
||||
*jisp = (*sjisp++ - offset) << 1; /* assign 1st byte */ \
|
||||
if (*sjisp < 0x9F) { /* check 2nd SJIS byte */ \
|
||||
*jisp++ -= 1; /* adjust 1st JIS byte */ \
|
||||
if (*sjisp > 0x7F) \
|
||||
*jisp++ = *sjisp++ - 0x20; \
|
||||
else \
|
||||
*jisp++ = *sjisp++ - 0x1F; \
|
||||
} else { \
|
||||
jisp++; \
|
||||
*jisp++ = *sjisp++ - 0x7E; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* net_sjis2jis(obj, sjisbuf, sjisbufsz)
|
||||
* Args:
|
||||
* sjisbuf: Ptr to a buf of SJIS chars
|
||||
* sjisbufsz: Size in bytes of sjisbuf
|
||||
* jismode: Ptr to encoding mode, use as arg for next call to
|
||||
* mz_sjis2jis() for rest of current SJIS data. First call should
|
||||
* initialize mode to ASCII (0).
|
||||
* uncvtbuf: If entire buffer was converted, uncvtbuf[0] will be null,
|
||||
* else this points to SJIS chars that were NOT converted
|
||||
* and mz_sjis2jis() with additional SJIS chars appended.
|
||||
* Return:
|
||||
* Returns NULL on failure, otherwise it returns a pointer to a buffer of
|
||||
* converted SJIS characters. Caller must XP_FREE() this memory.
|
||||
*
|
||||
* Description:
|
||||
* Allocate destination JIS buffer.
|
||||
*
|
||||
* If the SJIS to JIS conversion changes JIS encoding, output proper ESC
|
||||
* sequence.
|
||||
*
|
||||
* If byte in ASCII range, just copy it to JIS buffer.
|
||||
* If Half-width SJIS katakana (1 byte), convert to Half-width JIS katakana.
|
||||
* --- Now Half-width SJIS katakana is converted to 2-byte JIS katakana. ---
|
||||
* If 2-byte SJIS, convert to 2-byte JIS.
|
||||
* Otherwise assume user-defined SJIS, just copy 2 bytes.
|
||||
*
|
||||
* If either SJIS buffer does not contain complete SJIS char or JIS buffer
|
||||
* is full, then return unconverted SJIS to caller. Caller should
|
||||
* append more data and recall mz_sjis2jis.
|
||||
*/
|
||||
|
||||
MODULE_PRIVATE unsigned char *
|
||||
mz_sjis2jis( CCCDataObject obj,
|
||||
const unsigned char *sjisbuf, /* SJIS buf for conversion */
|
||||
int32 sjisbufsz) /* SJIS buf size in bytes */
|
||||
{
|
||||
unsigned char *tobuf = NULL;
|
||||
int32 tobufsz;
|
||||
register unsigned char *sjisp, *tobufp; /* current byte in bufs */
|
||||
register unsigned char *sjisep, *toep; /* end of buffers */
|
||||
int32 uncvtlen;
|
||||
unsigned char *uncvtbuf = INTL_GetCCCUncvtbuf(obj);
|
||||
#if defined(MOZ_MAIL_NEWS)
|
||||
unsigned char kanabuf[2]; /* for half-width kana */
|
||||
uint32 byteused; /* for half-width kana */
|
||||
#endif
|
||||
|
||||
/* Allocate a JIS buffer: */
|
||||
/* JIS is longer than SJIS because of ESC seq. In the worst case
|
||||
* ( alternating Half-width Kana and Roman chars ), converted
|
||||
* JIS will be 4X the size of the original SJIS + 1 for nul byte.
|
||||
* Worst case: single half-width kana:
|
||||
* ESC ( I KANA ESC ( J
|
||||
*/
|
||||
uncvtlen = strlen((char *)uncvtbuf);
|
||||
tobufsz = ((sjisbufsz + uncvtlen) << 2) + 8;
|
||||
if ((tobuf = (unsigned char *)XP_ALLOC(tobufsz)) == (unsigned char *)NULL) {
|
||||
INTL_SetCCCRetval(obj, MK_OUT_OF_MEMORY);
|
||||
return(NULL);
|
||||
}
|
||||
/* Initialize pointers, etc. */
|
||||
sjisp = (unsigned char *)sjisbuf;
|
||||
sjisep = sjisp + sjisbufsz - 1;
|
||||
|
||||
#define uncvtp tobufp /* use tobufp as temp */
|
||||
/* If prev. unconverted chars, append unconverted
|
||||
* chars w/new chars and try to process.
|
||||
*/
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
uncvtp = uncvtbuf + uncvtlen;
|
||||
while (uncvtp < (uncvtbuf + UNCVTBUF_SIZE) &&
|
||||
sjisp <= sjisep)
|
||||
*uncvtp++ = *sjisp++;
|
||||
*uncvtp = '\0'; /* nul terminate */
|
||||
sjisp = uncvtbuf; /* process unconverted first */
|
||||
sjisep = uncvtp - 1;
|
||||
}
|
||||
#undef uncvtp
|
||||
|
||||
tobufp = tobuf;
|
||||
toep = tobufp + tobufsz - 2; /* save space for terminating null */
|
||||
|
||||
WHILELOOP:
|
||||
/* While SJIS data && space in JIS buf. */
|
||||
while ((sjisp <= sjisep) && (tobufp <= toep)) {
|
||||
if (*sjisp < 0x80) {
|
||||
/* ASCII/JIS-Roman */
|
||||
if (INTL_GetCCCJismode(obj) != JIS_Roman) {
|
||||
InsASCII_ESC(tobufp, obj);
|
||||
}
|
||||
*tobufp++ = *sjisp++;
|
||||
|
||||
} else if (*sjisp < 0xA0) {
|
||||
/* 1st byte of 2-byte low SJIS. */
|
||||
if (sjisp+1 > sjisep) /* No 2nd byte in SJIS buffer? */
|
||||
break;
|
||||
|
||||
if (INTL_GetCCCJismode(obj) != JIS_208_83) {
|
||||
Ins208_83_ESC(tobufp, obj);
|
||||
}
|
||||
|
||||
TwoByteSJIS2JIS(sjisp, tobufp, 0x70);
|
||||
|
||||
} else if (*sjisp==0xA0) {
|
||||
/* SJIS half-width space. */
|
||||
/* Just treat like Roman?? */
|
||||
if (INTL_GetCCCJismode(obj) != JIS_Roman) {
|
||||
InsASCII_ESC(tobufp, obj);
|
||||
}
|
||||
*tobufp++ = *sjisp++;
|
||||
|
||||
} else if (*sjisp < 0xE0) {
|
||||
/* SJIS half-width katakana */
|
||||
#if defined(MOZ_MAIL_NEWS)
|
||||
if (!INTL_GetCCCCvtflag_SendHankakuKana(obj)) {
|
||||
if (INTL_GetCCCJismode(obj) != JIS_208_83) {
|
||||
Ins208_83_ESC(tobufp, obj);
|
||||
}
|
||||
INTL_SjisHalf2FullKana(sjisp, (uint32)sjisep - (uint32)sjisp + 1, kanabuf, &byteused);
|
||||
/* SJIS Katakana is 0x8340-0x8396 */
|
||||
*tobufp++ = ((kanabuf[0] - 0x70) << 1) - 1; /* assign 1st byte */
|
||||
if (kanabuf[1] > 0x7F)
|
||||
*tobufp++ = kanabuf[1] - 0x20;
|
||||
else
|
||||
*tobufp++ = kanabuf[1] - 0x1F;
|
||||
sjisp += byteused;
|
||||
} else {
|
||||
if (INTL_GetCCCJismode(obj) != JIS_HalfKana) {
|
||||
InsHalfKana_ESC(tobufp, obj);
|
||||
}
|
||||
*tobufp++ = *sjisp & 0x7F;
|
||||
sjisp++;
|
||||
}
|
||||
#else
|
||||
if (INTL_GetCCCJismode(obj) != JIS_HalfKana) {
|
||||
InsHalfKana_ESC(tobufp, obj);
|
||||
}
|
||||
*tobufp++ = *sjisp & 0x7F;
|
||||
sjisp++;
|
||||
#endif
|
||||
} else if (*sjisp < 0xF0) {
|
||||
/* 1st byte of 2-byte high SJIS */
|
||||
if (sjisp+1 > sjisep) /* No 2nd byte in SJIS buffer? */
|
||||
break;
|
||||
|
||||
if (INTL_GetCCCJismode(obj) != JIS_208_83) {
|
||||
Ins208_83_ESC(tobufp, obj);
|
||||
}
|
||||
|
||||
TwoByteSJIS2JIS(sjisp, tobufp, 0xB0);
|
||||
} else {
|
||||
/* User Defined SJIS: copy bytes */
|
||||
if (sjisp+1 > sjisep) /* No 2nd byte in SJIS buf? */
|
||||
break;
|
||||
|
||||
if (INTL_GetCCCJismode(obj) != JIS_208_83) {
|
||||
Ins208_83_ESC(tobufp, obj);
|
||||
}
|
||||
|
||||
*tobufp++ = *sjisp++; /* Just copy 2 bytes. */
|
||||
*tobufp++ = *sjisp++;
|
||||
}
|
||||
}
|
||||
|
||||
if (uncvtbuf[0] != '\0') {
|
||||
/* tobufp pts to 1st unprocessed char in
|
||||
* tobuf. Some may have been processed
|
||||
* while processing unconverted chars,
|
||||
* so set up ptrs not to process them
|
||||
* twice.
|
||||
*/
|
||||
sjisp = (unsigned char *)sjisbuf + (sjisp - uncvtbuf - uncvtlen);
|
||||
/* save space for term. null */
|
||||
sjisep = (unsigned char *)sjisbuf + sjisbufsz - 1;
|
||||
uncvtbuf[0] = '\0'; /* No more uncoverted chars. */
|
||||
goto WHILELOOP; /* Process new data */
|
||||
}
|
||||
|
||||
if (INTL_GetCCCJismode(obj) != JIS_Roman) {
|
||||
INTL_SetCCCJismode(obj, JIS_Roman);
|
||||
InsASCII_ESC(tobufp, obj);
|
||||
}
|
||||
|
||||
*tobufp = '\0'; /* null terminate JIS data */
|
||||
INTL_SetCCCLen(obj, tobufp - tobuf); /* length not counting null */
|
||||
|
||||
if (sjisp <= sjisep) { /* uncoverted SJIS? */
|
||||
tobufp = uncvtbuf; /* reuse the tobufp as a TEMP */
|
||||
while (sjisp <= sjisep)
|
||||
*tobufp++ = *sjisp++;
|
||||
*tobufp = '\0'; /* null terminate */
|
||||
}
|
||||
return(tobuf);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,382 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#include "intlpriv.h"
|
||||
#include "ugen.h"
|
||||
#include "xp.h"
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
typedef XP_Bool (*uSubGeneratorFunc) (uint16 in, unsigned char* out);
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
|
||||
typedef XP_Bool (*uGeneratorFunc) (
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
);
|
||||
|
||||
MODULE_PRIVATE XP_Bool uGenerate(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
);
|
||||
|
||||
#define uSubGennerator(sub,in,out) (* m_subgenerator[sub])((in),(out))
|
||||
|
||||
PRIVATE XP_Bool uCheckAndGenAlways1Byte(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
);
|
||||
PRIVATE XP_Bool uCheckAndGenAlways2Byte(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
);
|
||||
PRIVATE XP_Bool uCheckAndGenAlways2ByteShiftGR(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
);
|
||||
PRIVATE XP_Bool uCheckAndGenByTable(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
);
|
||||
PRIVATE XP_Bool uCheckAndGen2ByteGRPrefix8F(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
);
|
||||
PRIVATE XP_Bool uCheckAndGen2ByteGRPrefix8EA2(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
);
|
||||
|
||||
|
||||
PRIVATE XP_Bool uGenAlways2Byte(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
);
|
||||
PRIVATE XP_Bool uGenAlways2ByteShiftGR(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
);
|
||||
PRIVATE XP_Bool uGenAlways1Byte(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
);
|
||||
PRIVATE XP_Bool uGenAlways1BytePrefix8E(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
);
|
||||
PRIVATE XP_Bool uGenAlways2ByteUTF8(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
);
|
||||
PRIVATE XP_Bool uGenAlways3ByteUTF8(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
);
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE uGeneratorFunc m_generator[uNumOfCharsetType] =
|
||||
{
|
||||
uCheckAndGenAlways1Byte,
|
||||
uCheckAndGenAlways2Byte,
|
||||
uCheckAndGenByTable,
|
||||
uCheckAndGenAlways2ByteShiftGR,
|
||||
uCheckAndGen2ByteGRPrefix8F,
|
||||
uCheckAndGen2ByteGRPrefix8EA2,
|
||||
};
|
||||
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
|
||||
PRIVATE uSubGeneratorFunc m_subgenerator[uNumOfCharType] =
|
||||
{
|
||||
uGenAlways1Byte,
|
||||
uGenAlways2Byte,
|
||||
uGenAlways2ByteShiftGR,
|
||||
uGenAlways1BytePrefix8E,
|
||||
uGenAlways2ByteUTF8,
|
||||
uGenAlways3ByteUTF8
|
||||
|
||||
};
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
MODULE_PRIVATE XP_Bool uGenerate(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
)
|
||||
{
|
||||
return (* m_generator[shift->classID]) (shift,state,in,out,outbuflen,outlen);
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uGenAlways1Byte(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
)
|
||||
{
|
||||
out[0] = (unsigned char)in;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uGenAlways2Byte(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
)
|
||||
{
|
||||
out[0] = (unsigned char)((in >> 8) & 0xff);
|
||||
out[1] = (unsigned char)(in & 0xff);
|
||||
return TRUE;
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uGenAlways2ByteShiftGR(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
)
|
||||
{
|
||||
out[0] = (unsigned char)(((in >> 8) & 0xff) | 0x80);
|
||||
out[1] = (unsigned char)((in & 0xff) | 0x80);
|
||||
return TRUE;
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uGenAlways1BytePrefix8E(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
)
|
||||
{
|
||||
out[0] = 0x8E;
|
||||
out[1] = (unsigned char)(in & 0xff);
|
||||
return TRUE;
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uGenAlways2ByteUTF8(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
)
|
||||
{
|
||||
out[0] = (unsigned char)(0xC0 | (( in >> 6 ) & 0x1F));
|
||||
out[1] = (unsigned char)(0x80 | (( in ) & 0x3F));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uGenAlways3ByteUTF8(
|
||||
uint16 in,
|
||||
unsigned char* out
|
||||
)
|
||||
{
|
||||
out[0] = (unsigned char)(0xE0 | (( in >> 12 ) & 0x0F));
|
||||
out[1] = (unsigned char)(0x80 | (( in >> 6 ) & 0x3F));
|
||||
out[2] = (unsigned char)(0x80 | (( in ) & 0x3F));
|
||||
return TRUE;
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uCheckAndGenAlways1Byte(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
)
|
||||
{
|
||||
/* Don't check inlen. The caller should ensure it is larger than 0 */
|
||||
*outlen = 1;
|
||||
out[0] = in & 0xff;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uCheckAndGenAlways2Byte(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
)
|
||||
{
|
||||
if(outbuflen < 2)
|
||||
return FALSE;
|
||||
else
|
||||
{
|
||||
*outlen = 2;
|
||||
out[0] = ((in >> 8 ) & 0xff);
|
||||
out[1] = in & 0xff;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uCheckAndGenAlways2ByteShiftGR(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
)
|
||||
{
|
||||
if(outbuflen < 2)
|
||||
return FALSE;
|
||||
else
|
||||
{
|
||||
*outlen = 2;
|
||||
out[0] = ((in >> 8 ) & 0xff) | 0x80;
|
||||
out[1] = (in & 0xff) | 0x80;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uCheckAndGenByTable(
|
||||
uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
)
|
||||
{
|
||||
int16 i;
|
||||
uShiftCell* cell = &(shift->shiftcell[0]);
|
||||
int16 itemnum = shift->numOfItem;
|
||||
unsigned char inH, inL;
|
||||
inH = (in >> 8) & 0xff;
|
||||
inL = (in & 0xff );
|
||||
for(i=0;i<itemnum;i++)
|
||||
{
|
||||
if( ( inL >= cell[i].shiftout.MinLB) &&
|
||||
( inL <= cell[i].shiftout.MaxLB) &&
|
||||
( inH >= cell[i].shiftout.MinHB) &&
|
||||
( inH <= cell[i].shiftout.MaxHB) )
|
||||
{
|
||||
if(outbuflen < cell[i].reserveLen)
|
||||
return FALSE;
|
||||
else
|
||||
{
|
||||
*outlen = cell[i].reserveLen;
|
||||
return (uSubGennerator(cell[i].classID,in,out));
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uCheckAndGen2ByteGRPrefix8F( uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
)
|
||||
{
|
||||
if(outbuflen < 3)
|
||||
return FALSE;
|
||||
else
|
||||
{
|
||||
*outlen = 3;
|
||||
out[0] = 0x8F;
|
||||
out[1] = ((in >> 8 ) & 0xff) | 0x80;
|
||||
out[2] = (in & 0xff) | 0x80;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uCheckAndGen2ByteGRPrefix8EA2( uShiftTable *shift,
|
||||
int32* state,
|
||||
uint16 in,
|
||||
unsigned char* out,
|
||||
uint32 outbuflen,
|
||||
uint32* outlen
|
||||
)
|
||||
{
|
||||
if(outbuflen < 4)
|
||||
return FALSE;
|
||||
else
|
||||
{
|
||||
*outlen = 4;
|
||||
out[0] = 0x8E;
|
||||
out[1] = 0xA2;
|
||||
out[2] = ((in >> 8 ) & 0xff) | 0x80;
|
||||
out[3] = (in & 0xff) | 0x80;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,103 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef __UGEN__
|
||||
#define __UGEN__
|
||||
|
||||
#include "xp_core.h"
|
||||
|
||||
|
||||
/* =================================================
|
||||
uShiftTable
|
||||
================================================= */
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
|
||||
enum {
|
||||
u1ByteCharset = 0,
|
||||
u2BytesCharset,
|
||||
uMultibytesCharset,
|
||||
u2BytesGRCharset,
|
||||
u2BytesGRPrefix8FCharset,
|
||||
u2BytesGRPrefix8EA2Charset,
|
||||
uNumOfCharsetType
|
||||
};
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
|
||||
enum {
|
||||
u1ByteChar = 0,
|
||||
u2BytesChar,
|
||||
u2BytesGRChar,
|
||||
u1BytePrefix8EChar, /* Used by JIS0201 GR in EUC_JP */
|
||||
u2BytesUTF8, /* Used by UTF8 */
|
||||
u3BytesUTF8, /* Used by UTF8 */
|
||||
uNumOfCharType
|
||||
};
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
typedef struct {
|
||||
unsigned char MinHB;
|
||||
unsigned char MinLB;
|
||||
unsigned char MaxHB;
|
||||
unsigned char MaxLB;
|
||||
} uShiftOut;
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
typedef struct {
|
||||
unsigned char Min;
|
||||
unsigned char Max;
|
||||
} uShiftIn;
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
typedef struct {
|
||||
unsigned char classID;
|
||||
unsigned char reserveLen;
|
||||
uShiftIn shiftin;
|
||||
uShiftOut shiftout;
|
||||
} uShiftCell;
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
typedef struct {
|
||||
int16 numOfItem;
|
||||
int16 classID;
|
||||
uShiftCell shiftcell[1];
|
||||
} uShiftTable;
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
|
||||
#define MAXINTERCSID 4
|
||||
typedef struct StrRangeMap StrRangeMap;
|
||||
struct StrRangeMap {
|
||||
uint16 intercsid;
|
||||
unsigned char min;
|
||||
unsigned char max;
|
||||
};
|
||||
typedef struct UnicodeTableSet UnicodeTableSet;
|
||||
struct UnicodeTableSet {
|
||||
uint16 maincsid;
|
||||
StrRangeMap range[MAXINTERCSID];
|
||||
};
|
||||
#endif
|
||||
@ -1,629 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#include "intlpriv.h"
|
||||
#include "ugen.h"
|
||||
#include "unicpriv.h"
|
||||
#include "prtypes.h" /* For IS_LITTLE_ENDIAN */
|
||||
|
||||
#ifdef XP_WIN
|
||||
/* We try to move to UNICODE 2.0 BASE
|
||||
The FULL_KOREAN_TABLE is only defined in Window platform when we use
|
||||
UNICODE 2.0 table .
|
||||
We do not defined FULL_KOREAN_TABLE if we use UNICODE 1.1 BASE
|
||||
We do not defined FULL_KOREAN_TABLE for Mac and UNIX since the 2.0 Korean
|
||||
Table for Mac and UNIX is only the part that these platform can handle
|
||||
(So it is still a GL table )
|
||||
*/
|
||||
|
||||
|
||||
#define FULL_KOREAN_TABLE 1
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
GenTableData.c
|
||||
|
||||
*/
|
||||
/*=========================================================================================
|
||||
Generator Table
|
||||
=========================================================================================*/
|
||||
#define PACK(h,l) (int16)(( (h) << 8) | (l))
|
||||
|
||||
#if defined(IS_LITTLE_ENDIAN)
|
||||
#define ShiftCell(sub,len,min,max,minh,minl,maxh,maxl) \
|
||||
PACK(len,sub), PACK(max,min), PACK(minl,minh), PACK(maxl,maxh)
|
||||
#else
|
||||
#define ShiftCell(sub,len,min,max,minh,minl,maxh,maxl) \
|
||||
PACK(sub,len), PACK(min, max), PACK(minh,minl), PACK(maxh,maxl)
|
||||
#endif
|
||||
/*-----------------------------------------------------------------------------------
|
||||
ShiftTable for single byte encoding
|
||||
-----------------------------------------------------------------------------------*/
|
||||
PRIVATE int16 sbShiftT[] = {
|
||||
0, u1ByteCharset,
|
||||
ShiftCell(0,0,0,0,0,0,0,0)
|
||||
};
|
||||
/*-----------------------------------------------------------------------------------
|
||||
ShiftTable for two byte encoding
|
||||
-----------------------------------------------------------------------------------*/
|
||||
PRIVATE int16 tbShiftT[] = {
|
||||
0, u2BytesCharset,
|
||||
ShiftCell(0,0,0,0,0,0,0,0)
|
||||
};
|
||||
/*-----------------------------------------------------------------------------------
|
||||
ShiftTable for two byte encoding
|
||||
-----------------------------------------------------------------------------------*/
|
||||
PRIVATE int16 tbGRShiftT[] = {
|
||||
0, u2BytesGRCharset,
|
||||
ShiftCell(0,0,0,0,0,0,0,0)
|
||||
};
|
||||
/*-----------------------------------------------------------------------------------
|
||||
ShiftTable for KSC encoding
|
||||
-----------------------------------------------------------------------------------*/
|
||||
#ifdef FULL_KOREAN_TABLE
|
||||
#define tbKSCShiftT tbShiftT
|
||||
#else
|
||||
#define tbKSCShiftT tbGRShiftT
|
||||
#endif
|
||||
/*-----------------------------------------------------------------------------------
|
||||
ShiftTable for shift jis encoding
|
||||
-----------------------------------------------------------------------------------*/
|
||||
PRIVATE int16 sjisShiftT[] = {
|
||||
4, uMultibytesCharset,
|
||||
ShiftCell(u1ByteChar, 1, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x7F),
|
||||
ShiftCell(u1ByteChar, 1, 0xA1, 0xDF, 0x00, 0xA1, 0x00, 0xDF),
|
||||
ShiftCell(u2BytesChar, 2, 0x81, 0x9F, 0x81, 0x40, 0x9F, 0xFC),
|
||||
ShiftCell(u2BytesChar, 2, 0xE0, 0xFC, 0xE0, 0x40, 0xFC, 0xFC)
|
||||
};
|
||||
/*-----------------------------------------------------------------------------------
|
||||
ShiftTable for t61 encoding
|
||||
-----------------------------------------------------------------------------------*/
|
||||
PRIVATE int16 t61ShiftT[] = {
|
||||
3, uMultibytesCharset,
|
||||
ShiftCell(u1ByteChar, 1, 0x00, 0xBF, 0x00, 0x00, 0x00, 0xBF),
|
||||
ShiftCell(u1ByteChar, 1, 0xD0, 0xFF, 0x00, 0xD0, 0x00, 0xFF),
|
||||
ShiftCell(u2BytesChar, 2, 0xC0, 0xCF, 0xC0, 0x41, 0xCF, 0x7A)
|
||||
};
|
||||
/*-----------------------------------------------------------------------------------
|
||||
ShiftTable for JIS0212 in EUCJP encoding
|
||||
-----------------------------------------------------------------------------------*/
|
||||
PRIVATE int16 x0212ShiftT[] = {
|
||||
0, u2BytesGRPrefix8FCharset,
|
||||
ShiftCell(0,0,0,0,0,0,0,0)
|
||||
};
|
||||
/*-----------------------------------------------------------------------------------
|
||||
ShiftTable for CNS11643-2 in EUC_TW encoding
|
||||
-----------------------------------------------------------------------------------*/
|
||||
PRIVATE int16 cns2ShiftT[] = {
|
||||
0, u2BytesGRPrefix8EA2Charset,
|
||||
ShiftCell(0,0,0,0,0,0,0,0)
|
||||
};
|
||||
/*-----------------------------------------------------------------------------------
|
||||
ShiftTable for big5 encoding
|
||||
-----------------------------------------------------------------------------------*/
|
||||
PRIVATE int16 big5ShiftT[] = {
|
||||
2, uMultibytesCharset,
|
||||
ShiftCell(u1ByteChar, 1, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x7F),
|
||||
ShiftCell(u2BytesChar, 2, 0xA1, 0xFE, 0xA1, 0x40, 0xFE, 0xFE)
|
||||
};
|
||||
/*-----------------------------------------------------------------------------------
|
||||
ShiftTable for jis0201 for euc_jp encoding
|
||||
-----------------------------------------------------------------------------------*/
|
||||
PRIVATE int16 x0201ShiftT[] = {
|
||||
2, uMultibytesCharset,
|
||||
ShiftCell(u1ByteChar, 1, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x7F),
|
||||
ShiftCell(u1BytePrefix8EChar, 2, 0x8E, 0x8E, 0x00, 0xA1, 0x00, 0xDF)
|
||||
};
|
||||
/*-----------------------------------------------------------------------------------
|
||||
ShiftTable for utf8
|
||||
-----------------------------------------------------------------------------------*/
|
||||
PRIVATE int16 utf8ShiftT[] = {
|
||||
3, uMultibytesCharset,
|
||||
ShiftCell(u1ByteChar, 1, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x7F),
|
||||
ShiftCell(u2BytesUTF8, 2, 0xC0, 0xDF, 0x00, 0x00, 0x07, 0xFF),
|
||||
ShiftCell(u3BytesUTF8, 3, 0xE0, 0xEF, 0x08, 0x00, 0xFF, 0xFF)
|
||||
};
|
||||
/*-----------------------------------------------------------------------------------
|
||||
Array of ShiftTable Pointer
|
||||
-----------------------------------------------------------------------------------*/
|
||||
/* This table is used for npc and unicode to unknow encoding conversion */
|
||||
/* for those font csid, it do not shift GR/GL */
|
||||
PRIVATE int16* npcShiftTable[MAXCSIDINTBL] =
|
||||
{
|
||||
/* 0x00-0x07 */
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
0,
|
||||
sjisShiftT,
|
||||
0,
|
||||
sbShiftT,
|
||||
big5ShiftT,
|
||||
|
||||
/* 0x08-0x0F */
|
||||
tbGRShiftT,
|
||||
0,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
tbKSCShiftT,
|
||||
0,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x10-0x17 */
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x18-0x1F */
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
sbShiftT,
|
||||
tbShiftT,
|
||||
sbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
|
||||
/* 0x20-0x27 */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
big5ShiftT,
|
||||
0,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x28-0x2F */
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
tbShiftT,
|
||||
|
||||
/* 0x30-0x37 */
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
0,
|
||||
0,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x38-0x3F */
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x40-0x47 */
|
||||
0,
|
||||
0,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
|
||||
/* 0x48-0x4F */
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
|
||||
/* 0x50-0x57 */
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x58-0x5F */
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
tbShiftT,
|
||||
tbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x60-0x67 */
|
||||
t61ShiftT,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
/* 0x68-0x6F */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
/* 0x70-0x77 */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
/* 0x78-0x7F */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
sbShiftT,
|
||||
0,
|
||||
};
|
||||
|
||||
/* This table is used for unicode to single encoding conversion */
|
||||
/* for those font csid, it always shift GR/GL */
|
||||
PRIVATE int16* strShiftTable[MAXCSIDINTBL] =
|
||||
{
|
||||
/* 0x00-0x07 */
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
0,
|
||||
sjisShiftT,
|
||||
0,
|
||||
sbShiftT,
|
||||
big5ShiftT,
|
||||
|
||||
/* 0x08-0x0F */
|
||||
tbGRShiftT,
|
||||
0,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
tbKSCShiftT,
|
||||
0,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x10-0x17 */
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x18-0x1F */
|
||||
tbGRShiftT,
|
||||
cns2ShiftT,
|
||||
tbGRShiftT,
|
||||
x0201ShiftT,
|
||||
tbGRShiftT,
|
||||
sbShiftT,
|
||||
x0212ShiftT,
|
||||
tbGRShiftT,
|
||||
|
||||
/* 0x20-0x27 */
|
||||
0,
|
||||
0,
|
||||
utf8ShiftT,
|
||||
0,
|
||||
0,
|
||||
big5ShiftT,
|
||||
0,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x28-0x2F */
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
0,
|
||||
|
||||
/* 0x30-0x37 */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x38-0x3F */
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x40-0x47 */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
/* 0x48-0x4F */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
/* 0x50-0x57 */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x58-0x5F */
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
0,
|
||||
0,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
sbShiftT,
|
||||
|
||||
/* 0x60-0x67 */
|
||||
t61ShiftT,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
/* 0x68-0x6F */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
/* 0x70-0x77 */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
/* 0x78-0x7F */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
sbShiftT,
|
||||
0,
|
||||
};
|
||||
|
||||
PRIVATE UnicodeTableSet unicodetableset[] =
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
{ CS_BIG5, {
|
||||
{CS_BIG5,0x81,0xFC},
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}},
|
||||
{ CS_GB_8BIT, {
|
||||
{CS_GB_8BIT,0xA1,0xFE},
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}},
|
||||
/* We do not change the Mac Korean even we use 2.0 base table */
|
||||
/* This is because the Mac table is not the full table */
|
||||
/* It is still a GL table */
|
||||
{ CS_KSC_8BIT, {
|
||||
{CS_KSC_8BIT,0xA1,0xFE},
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}},
|
||||
{ CS_USER_DEFINED_ENCODING, {
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT, 0xFF,0x00},
|
||||
{CS_DEFAULT, 0xFF,0x00},
|
||||
{CS_DEFAULT, 0xFF,0x00}
|
||||
}},
|
||||
{ CS_DEFAULT, {
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}}
|
||||
#endif
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
{ CS_BIG5, {
|
||||
{CS_BIG5,0x81,0xFC},
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}},
|
||||
{ CS_GB_8BIT, {
|
||||
{CS_GB_8BIT,0xA1,0xFE},
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}},
|
||||
#ifdef FULL_KOREAN_TABLE
|
||||
{ CS_KSC_8BIT, {
|
||||
{CS_KSC_8BIT,0x81,0xFE}, /* CAREFUL: it is 0x81 not 0xA1 here */
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}},
|
||||
#else
|
||||
{ CS_KSC_8BIT, {
|
||||
{CS_KSC_8BIT,0xA1,0xFE},
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}},
|
||||
#endif
|
||||
{ CS_USER_DEFINED_ENCODING, {
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT, 0xFF,0x00},
|
||||
{CS_DEFAULT, 0xFF,0x00},
|
||||
{CS_DEFAULT, 0xFF,0x00}
|
||||
}},
|
||||
{ CS_DEFAULT, {
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}}
|
||||
#endif
|
||||
#ifdef XP_UNIX
|
||||
{ CS_EUCJP, {
|
||||
{CS_JISX0208,0xA1,0xFE},
|
||||
{CS_JISX0201,0x20,0x7E},
|
||||
{CS_JISX0201,0x8E,0x8E},
|
||||
{CS_JISX0212,0x8F,0x8F}
|
||||
}},
|
||||
{ CS_BIG5, {
|
||||
{CS_X_BIG5,0x81,0xFC},
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}},
|
||||
{ CS_CNS_8BIT, {
|
||||
{CS_CNS11643_1,0xA1,0xFE},
|
||||
{CS_CNS11643_2,0x8E,0x8E},
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}},
|
||||
{ CS_GB_8BIT, {
|
||||
{CS_GB2312,0xA1,0xFE},
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}},
|
||||
/* We do not change the UNIX Korean even we use 2.0 base table */
|
||||
/* This is because the UNIX table is not the full table */
|
||||
/* It is still a GL table */
|
||||
{ CS_KSC_8BIT, {
|
||||
{CS_KSC5601,0xA1,0xFE},
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}},
|
||||
{ CS_USER_DEFINED_ENCODING, {
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT, 0xFF,0x00},
|
||||
{CS_DEFAULT, 0xFF,0x00},
|
||||
{CS_DEFAULT, 0xFF,0x00}
|
||||
}},
|
||||
{ CS_USRDEF2, {
|
||||
{CS_ASCII,0x00,0x7E},
|
||||
{CS_DEFAULT, 0xFF,0x00},
|
||||
{CS_DEFAULT, 0xFF,0x00},
|
||||
{CS_DEFAULT, 0xFF,0x00}
|
||||
}},
|
||||
{ CS_DEFAULT, {
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00},
|
||||
{CS_DEFAULT,0xFF,0x00}
|
||||
}}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
MODULE_PRIVATE UnicodeTableSet* GetUnicodeTableSet(uint16 csid)
|
||||
{
|
||||
int i;
|
||||
for(i=0;unicodetableset[i].maincsid != CS_DEFAULT;i++)
|
||||
{
|
||||
if(unicodetableset[i].maincsid == csid)
|
||||
return &(unicodetableset[i]);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------
|
||||
Public Function
|
||||
-----------------------------------------------------------------------------------*/
|
||||
MODULE_PRIVATE uShiftTable* GetShiftTableFromCsid(uint16 csid)
|
||||
{
|
||||
return (uShiftTable*)(strShiftTable[csid & (MAXCSIDINTBL - 1)]);
|
||||
}
|
||||
MODULE_PRIVATE uShiftTable* InfoToShiftTable(unsigned char info)
|
||||
{
|
||||
return (uShiftTable*)(npcShiftTable[info & (MAXCSIDINTBL - 1)]);
|
||||
}
|
||||
@ -1,237 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#include "intlpriv.h"
|
||||
#include "unicpriv.h"
|
||||
|
||||
typedef uint16 (* MapFormatFunc)(uint16 in,uTable *uT,uMapCell *cell);
|
||||
typedef XP_Bool (* HitFormateFunc)(uint16 in,uMapCell *cell);
|
||||
typedef void (* IterateFormatFunc)(uTable *uT, uMapCell *cell,uMapIterateFunc callback, uint16 context);
|
||||
|
||||
PRIVATE XP_Bool uHitFormate0(uint16 in,uMapCell *cell);
|
||||
PRIVATE XP_Bool uHitFormate1(uint16 in,uMapCell *cell);
|
||||
PRIVATE XP_Bool uHitFormate2(uint16 in,uMapCell *cell);
|
||||
PRIVATE uint16 uMapFormate0(uint16 in,uTable *uT,uMapCell *cell);
|
||||
PRIVATE uint16 uMapFormate1(uint16 in,uTable *uT,uMapCell *cell);
|
||||
PRIVATE uint16 uMapFormate2(uint16 in,uTable *uT,uMapCell *cell);
|
||||
PRIVATE void uIterateFormate0(uTable *uT, uMapCell *cell,uMapIterateFunc callback, uint16 context);
|
||||
PRIVATE void uIterateFormate1(uTable *uT, uMapCell *cell,uMapIterateFunc callback, uint16 context);
|
||||
PRIVATE void uIterateFormate2(uTable *uT, uMapCell *cell,uMapIterateFunc callback, uint16 context);
|
||||
PRIVATE uMapCell *uGetMapCell(uTable *uT, int16 item);
|
||||
PRIVATE char uGetFormat(uTable *uT, int16 item);
|
||||
|
||||
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE MapFormatFunc m_map[uNumFormatTag] =
|
||||
{
|
||||
uMapFormate0,
|
||||
uMapFormate1,
|
||||
uMapFormate2,
|
||||
};
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE IterateFormatFunc m_iterate[uNumFormatTag] =
|
||||
{
|
||||
uIterateFormate0,
|
||||
uIterateFormate1,
|
||||
uIterateFormate2,
|
||||
};
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE HitFormateFunc m_hit[uNumFormatTag] =
|
||||
{
|
||||
uHitFormate0,
|
||||
uHitFormate1,
|
||||
uHitFormate2,
|
||||
};
|
||||
|
||||
/*
|
||||
Need more work
|
||||
*/
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uHit(unsigned char format, uint16 in,uMapCell *cell)
|
||||
{
|
||||
return (* m_hit[format])((in),(cell));
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE void uCellIterate(unsigned char format, uTable *uT, uMapCell *cell,uMapIterateFunc callback, uint16 context)
|
||||
{
|
||||
(* m_iterate[format])((uT),(cell),(callback),(context));
|
||||
}
|
||||
/*
|
||||
Switch to Macro later for performance
|
||||
|
||||
#define uHit(format,in,cell) (* m_hit[format])((in),(cell))
|
||||
*/
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE uint16 uMap(unsigned char format, uint16 in,uTable *uT,uMapCell *cell)
|
||||
{
|
||||
return (* m_map[format])((in),(uT),(cell));
|
||||
}
|
||||
/*
|
||||
Switch to Macro later for performance
|
||||
|
||||
#define uMap(format,in,cell) (* m_map[format])((in),(cell))
|
||||
*/
|
||||
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
/*
|
||||
Switch to Macro later for performance
|
||||
*/
|
||||
PRIVATE uMapCell *uGetMapCell(uTable *uT, int16 item)
|
||||
{
|
||||
return ((uMapCell *)(((uint16 *)uT) + uT->offsetToMapCellArray) + item) ;
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
/*
|
||||
Switch to Macro later for performance
|
||||
*/
|
||||
PRIVATE char uGetFormat(uTable *uT, int16 item)
|
||||
{
|
||||
return (((((uint16 *)uT) + uT->offsetToFormatArray)[ item >> 2 ]
|
||||
>> (( item % 4 ) << 2)) & 0x0f);
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
MODULE_PRIVATE XP_Bool uMapCode(uTable *uT, uint16 in, uint16* out)
|
||||
{
|
||||
XP_Bool done = FALSE;
|
||||
uint16 itemOfList = uT->itemOfList;
|
||||
uint16 i;
|
||||
*out = NOMAPPING;
|
||||
for(i=0;i<itemOfList;i++)
|
||||
{
|
||||
uMapCell* uCell;
|
||||
char format = uGetFormat(uT,i);
|
||||
uCell = uGetMapCell(uT,i);
|
||||
if(uHit(format, in, uCell))
|
||||
{
|
||||
*out = uMap(format, in, uT,uCell);
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ( done && (*out != NOMAPPING));
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
MODULE_PRIVATE void uMapIterate(uTable *uT, uMapIterateFunc callback, uint16 context)
|
||||
{
|
||||
uint16 itemOfList = uT->itemOfList;
|
||||
uint16 i;
|
||||
for(i=0;i<itemOfList;i++)
|
||||
{
|
||||
uMapCell* uCell;
|
||||
char format = uGetFormat(uT,i);
|
||||
uCell = uGetMapCell(uT,i);
|
||||
uCellIterate(format, uT ,uCell,callback, context);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
member function
|
||||
*/
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uHitFormate0(uint16 in,uMapCell *cell)
|
||||
{
|
||||
return ( (in >= cell->fmt.format0.srcBegin) &&
|
||||
(in <= cell->fmt.format0.srcEnd) ) ;
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uHitFormate1(uint16 in,uMapCell *cell)
|
||||
{
|
||||
return uHitFormate0(in,cell);
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE XP_Bool uHitFormate2(uint16 in,uMapCell *cell)
|
||||
{
|
||||
return (in == cell->fmt.format2.srcBegin);
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE uint16 uMapFormate0(uint16 in,uTable *uT,uMapCell *cell)
|
||||
{
|
||||
return ((in - cell->fmt.format0.srcBegin) + cell->fmt.format0.destBegin);
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE uint16 uMapFormate1(uint16 in,uTable *uT,uMapCell *cell)
|
||||
{
|
||||
return (*(((uint16 *)uT) + uT->offsetToMappingTable
|
||||
+ cell->fmt.format1.mappingOffset + in - cell->fmt.format1.srcBegin));
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE uint16 uMapFormate2(uint16 in,uTable *uT,uMapCell *cell)
|
||||
{
|
||||
return (cell->fmt.format2.destBegin);
|
||||
}
|
||||
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE void uIterateFormate0(uTable *uT, uMapCell *cell,uMapIterateFunc callback, uint16 context)
|
||||
{
|
||||
uint16 ucs2;
|
||||
uint16 med;
|
||||
for(ucs2 = cell->fmt.format0.srcBegin, med = cell->fmt.format0.destBegin;
|
||||
ucs2 <= cell->fmt.format0.srcEnd ; ucs2++,med++)
|
||||
(*callback)(ucs2, med, context);
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE void uIterateFormate1(uTable *uT, uMapCell *cell,uMapIterateFunc callback, uint16 context)
|
||||
{
|
||||
uint16 ucs2;
|
||||
uint16 *medpt;
|
||||
medpt = (((uint16 *)uT) + uT->offsetToMappingTable + cell->fmt.format1.mappingOffset);
|
||||
for(ucs2 = cell->fmt.format1.srcBegin; ucs2 <= cell->fmt.format1.srcEnd ; ucs2++, medpt++)
|
||||
(*callback)(ucs2, *medpt, context);
|
||||
}
|
||||
/*=================================================================================
|
||||
|
||||
=================================================================================*/
|
||||
PRIVATE void uIterateFormate2(uTable *uT, uMapCell *cell,uMapIterateFunc callback, uint16 context)
|
||||
{
|
||||
(*callback)(cell->fmt.format2.srcBegin, cell->fmt.format2.destBegin, context);
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#ifndef __UMAP__
|
||||
#define __UMAP__
|
||||
|
||||
#define NOMAPPING 0xfffd
|
||||
|
||||
/* =================================================
|
||||
MapCellArray
|
||||
================================================= */
|
||||
|
||||
enum {
|
||||
uFormat0Tag = 0,
|
||||
uFormat1Tag,
|
||||
uFormat2Tag,
|
||||
uNumFormatTag
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
uint16 srcBegin; /* 2 byte */
|
||||
uint16 srcEnd; /* 2 byte */
|
||||
uint16 destBegin; /* 2 byte */
|
||||
} uFormat0;
|
||||
|
||||
typedef struct {
|
||||
uint16 srcBegin; /* 2 byte */
|
||||
uint16 srcEnd; /* 2 byte */
|
||||
uint16 mappingOffset; /* 2 byte */
|
||||
} uFormat1;
|
||||
|
||||
typedef struct {
|
||||
uint16 srcBegin; /* 2 byte */
|
||||
uint16 srcEnd; /* 2 byte -waste */
|
||||
uint16 destBegin; /* 2 byte */
|
||||
} uFormat2;
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
uFormat0 format0;
|
||||
uFormat1 format1;
|
||||
uFormat2 format2;
|
||||
} fmt;
|
||||
} uMapCell;
|
||||
|
||||
/* =================================================
|
||||
uTable
|
||||
================================================= */
|
||||
typedef struct {
|
||||
uint16 itemOfList;
|
||||
uint16 offsetToFormatArray;
|
||||
uint16 offsetToMapCellArray;
|
||||
uint16 offsetToMappingTable;
|
||||
uint16 data[1];
|
||||
} uTable;
|
||||
|
||||
#endif
|
||||
@ -1,26 +0,0 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
|
||||
DEPTH = ../../..
|
||||
|
||||
DIRS = ufrmtbl utotbl
|
||||
|
||||
REQUIRES = dbm
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
@ -1,31 +0,0 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = ufrmtbl utotbl
|
||||
|
||||
REQUIRES = dbm
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,245 +0,0 @@
|
||||
# -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
# HAND MADE BY FRANK TANG <ftang@netscape.com>
|
||||
# BY REFERENCE RFC 1489
|
||||
# KOI8-R CHARSET
|
||||
#
|
||||
#
|
||||
0x20 0x0020 # SPACE
|
||||
0x21 0x0021 # EXCLAMATION MARK
|
||||
0x22 0x0022 # QUOTATION MARK
|
||||
0x23 0x0023 # NUMBER SIGN
|
||||
0x24 0x0024 # DOLLAR SIGN
|
||||
0x25 0x0025 # PERCENT SIGN
|
||||
0x26 0x0026 # AMPERSAND
|
||||
0x27 0x0027 # APOSTROPHE
|
||||
0x28 0x0028 # LEFT PARENTHESIS
|
||||
0x29 0x0029 # RIGHT PARENTHESIS
|
||||
0x2A 0x002A # ASTERISK
|
||||
0x2B 0x002B # PLUS SIGN
|
||||
0x2C 0x002C # COMMA
|
||||
0x2D 0x002D # HYPHEN-MINUS
|
||||
0x2E 0x002E # FULL STOP
|
||||
0x2F 0x002F # SOLIDUS
|
||||
0x30 0x0030 # DIGIT ZERO
|
||||
0x31 0x0031 # DIGIT ONE
|
||||
0x32 0x0032 # DIGIT TWO
|
||||
0x33 0x0033 # DIGIT THREE
|
||||
0x34 0x0034 # DIGIT FOUR
|
||||
0x35 0x0035 # DIGIT FIVE
|
||||
0x36 0x0036 # DIGIT SIX
|
||||
0x37 0x0037 # DIGIT SEVEN
|
||||
0x38 0x0038 # DIGIT EIGHT
|
||||
0x39 0x0039 # DIGIT NINE
|
||||
0x3A 0x003A # COLON
|
||||
0x3B 0x003B # SEMICOLON
|
||||
0x3C 0x003C # LESS-THAN SIGN
|
||||
0x3D 0x003D # EQUALS SIGN
|
||||
0x3E 0x003E # GREATER-THAN SIGN
|
||||
0x3F 0x003F # QUESTION MARK
|
||||
0x40 0x0040 # COMMERCIAL AT
|
||||
0x41 0x0041 # LATIN CAPITAL LETTER A
|
||||
0x42 0x0042 # LATIN CAPITAL LETTER B
|
||||
0x43 0x0043 # LATIN CAPITAL LETTER C
|
||||
0x44 0x0044 # LATIN CAPITAL LETTER D
|
||||
0x45 0x0045 # LATIN CAPITAL LETTER E
|
||||
0x46 0x0046 # LATIN CAPITAL LETTER F
|
||||
0x47 0x0047 # LATIN CAPITAL LETTER G
|
||||
0x48 0x0048 # LATIN CAPITAL LETTER H
|
||||
0x49 0x0049 # LATIN CAPITAL LETTER I
|
||||
0x4A 0x004A # LATIN CAPITAL LETTER J
|
||||
0x4B 0x004B # LATIN CAPITAL LETTER K
|
||||
0x4C 0x004C # LATIN CAPITAL LETTER L
|
||||
0x4D 0x004D # LATIN CAPITAL LETTER M
|
||||
0x4E 0x004E # LATIN CAPITAL LETTER N
|
||||
0x4F 0x004F # LATIN CAPITAL LETTER O
|
||||
0x50 0x0050 # LATIN CAPITAL LETTER P
|
||||
0x51 0x0051 # LATIN CAPITAL LETTER Q
|
||||
0x52 0x0052 # LATIN CAPITAL LETTER R
|
||||
0x53 0x0053 # LATIN CAPITAL LETTER S
|
||||
0x54 0x0054 # LATIN CAPITAL LETTER T
|
||||
0x55 0x0055 # LATIN CAPITAL LETTER U
|
||||
0x56 0x0056 # LATIN CAPITAL LETTER V
|
||||
0x57 0x0057 # LATIN CAPITAL LETTER W
|
||||
0x58 0x0058 # LATIN CAPITAL LETTER X
|
||||
0x59 0x0059 # LATIN CAPITAL LETTER Y
|
||||
0x5A 0x005A # LATIN CAPITAL LETTER Z
|
||||
0x5B 0x005B # LEFT SQUARE BRACKET
|
||||
0x5C 0x005C # REVERSE SOLIDUS
|
||||
0x5D 0x005D # RIGHT SQUARE BRACKET
|
||||
0x5E 0x005E # CIRCUMFLEX ACCENT
|
||||
0x5F 0x005F # LOW LINE
|
||||
0x60 0x0060 # GRAVE ACCENT
|
||||
0x61 0x0061 # LATIN SMALL LETTER A
|
||||
0x62 0x0062 # LATIN SMALL LETTER B
|
||||
0x63 0x0063 # LATIN SMALL LETTER C
|
||||
0x64 0x0064 # LATIN SMALL LETTER D
|
||||
0x65 0x0065 # LATIN SMALL LETTER E
|
||||
0x66 0x0066 # LATIN SMALL LETTER F
|
||||
0x67 0x0067 # LATIN SMALL LETTER G
|
||||
0x68 0x0068 # LATIN SMALL LETTER H
|
||||
0x69 0x0069 # LATIN SMALL LETTER I
|
||||
0x6A 0x006A # LATIN SMALL LETTER J
|
||||
0x6B 0x006B # LATIN SMALL LETTER K
|
||||
0x6C 0x006C # LATIN SMALL LETTER L
|
||||
0x6D 0x006D # LATIN SMALL LETTER M
|
||||
0x6E 0x006E # LATIN SMALL LETTER N
|
||||
0x6F 0x006F # LATIN SMALL LETTER O
|
||||
0x70 0x0070 # LATIN SMALL LETTER P
|
||||
0x71 0x0071 # LATIN SMALL LETTER Q
|
||||
0x72 0x0072 # LATIN SMALL LETTER R
|
||||
0x73 0x0073 # LATIN SMALL LETTER S
|
||||
0x74 0x0074 # LATIN SMALL LETTER T
|
||||
0x75 0x0075 # LATIN SMALL LETTER U
|
||||
0x76 0x0076 # LATIN SMALL LETTER V
|
||||
0x77 0x0077 # LATIN SMALL LETTER W
|
||||
0x78 0x0078 # LATIN SMALL LETTER X
|
||||
0x79 0x0079 # LATIN SMALL LETTER Y
|
||||
0x7A 0x007A # LATIN SMALL LETTER Z
|
||||
0x7B 0x007B # LEFT CURLY BRACKET
|
||||
0x7C 0x007C # VERTICAL LINE
|
||||
0x7D 0x007D # RIGHT CURLY BRACKET
|
||||
0x7E 0x007E # TILDE
|
||||
0x80 0x2500 # FORMS LIGHT HORIZONTAL
|
||||
0x81 0x2502 # FORMS LIGHT VERTICAL
|
||||
0x82 0x250c # FORMS LIGHT DOWN AND RIGHT
|
||||
0x83 0x2510 # FORMS LIGHT DOWN AND LEFT
|
||||
0x84 0x2514 # FORMS LIGHT UP AND RIGHT
|
||||
0x85 0x2518 # FORMS LIGHT UP AND LEFT
|
||||
0x86 0x251c # FORMS LIGHT VERTICAL AND RIGHT
|
||||
0x87 0x2524 # FORMS LIGHT VERTICAL AND LEFT
|
||||
0x88 0x252c # FORMS LIGHT DOWN AND HORIZONTAL
|
||||
0x89 0x2534 # FORMS LIGHT UP AND HORIZONTAL
|
||||
0x8A 0x253c # FORMS LIGHT VERTICAL AND HORIZONTAL
|
||||
0x8B 0x2580 # UPPER HALF BLOCK
|
||||
0x8C 0x2584 # LOWER HALF BLOCK
|
||||
0x8D 0x2588 # FULL BLOCK
|
||||
0x8E 0x258c # LEFT HALF BLOCK
|
||||
0x8F 0x2590 # RIGHT HALF BLOCK
|
||||
0x90 0x2591 # LIGHT SHADE
|
||||
0x91 0x2592 # MEDIUM SHADE
|
||||
0x92 0x2593 # DARK SHADE
|
||||
0x93 0x2320 # TOP HALF INTEGRAL
|
||||
0x94 0x25A0 # BLACK SMALL SQUARE
|
||||
0x95 0x2219 # BULLET OPERATOR
|
||||
0x96 0x221A # SQUARE ROOT
|
||||
0x97 0x2248 # ALMOST EQUAL TO
|
||||
0x98 0x2264 # LESS THAN OR EQUAL TO
|
||||
0x99 0x2265 # GREATER THAN OR EQUAL TO
|
||||
0x9A 0x00A0 # NON-BREAKING SPACE
|
||||
0x9B 0x2321 # BOTTOM HALF INTEGRAL
|
||||
0x9C 0x00B0 # DEGREE SIGN
|
||||
0x9D 0X00B2 # SUPERSCRIPT DIGIT TWO
|
||||
0x9E 0X00B7 # MIDDLE DOT
|
||||
0x9F 0X00F7 # DIVISION SIGN
|
||||
0xA0 0x2550 # FORMS DOUBLE HORIZONTAL
|
||||
0xA1 0x2551 # FORMS DOUBLE VERTICAL
|
||||
0xA2 0x2552 # FORMS DOWN SINGLE AND RIGHT DOUBLE
|
||||
0xA3 0x0451 # CYRILLIC SMALL LETTER IO
|
||||
0xA4 0x2553 # FORMS DOWN DOUBLE AND RIGHT SINGLE
|
||||
0xA5 0x2554 # FORMS DOUBLE DOWN AND RIGHT
|
||||
0xA6 0x2555 # FORMS DOWN SINGLE AND LEFT DOUBLE
|
||||
0xA7 0x2556 # FORMS DOWN DOUBLE AND LEFT SINGLE
|
||||
0xA8 0x2557 # FORMS DOUBLE DOWN AND LEFT
|
||||
0xA9 0x2558 # FORMS UP SINGLE AND RIGHT DOUBLE
|
||||
0xAA 0x2559 # FORMS UP DOUBLE AND RIGHT SINGLE
|
||||
0xAB 0x255A # FORMS DOUBLE UP AND RIGHT
|
||||
0xAC 0x255B # FORMS UP SINGLE AND LEFT DOUBLE
|
||||
0xAD 0x255C # FORMS UP DOUBLE AND LEFT SINGLE
|
||||
0xAE 0x255D # FORMS DOUBLE UP AND LEFT
|
||||
0xAF 0x255E # FORMS VERTICAL SINGLE AND RIGHT DOUBLE
|
||||
0xB0 0x255F # FORMS VERTICAL DOUBLE AND RIGHT SINGLE
|
||||
0xB1 0x2560 # FORMS DOUBLE VERTICAL AND RIGHT
|
||||
0xB2 0x2561 # FORMS VERTICAL SINGLE AND LEFT DOUBLE
|
||||
0xB3 0X0401 # CYRILLIC CAPITAL LETTER IO
|
||||
0xB4 0x2562 # FORMS VERTICAL DOUBLE AND LEFT SINGLE
|
||||
0xB5 0x2563 # FORMS DOUBLE VERTICAL AND LEFT
|
||||
0xB6 0x2564 # FORMS DOWN SINGLE AND HORIZONTAL DOUBLE
|
||||
0xB7 0x2565 # FORMS DOWN DOUBLE AND HORIZONTAL SINGLE
|
||||
0xB8 0x2566 # FORMS DOUBLE DOWN AND HORIZONTAL
|
||||
0xB9 0x2567 # FORMS UP SINGLE AND HORIZONTAL DOUBLE
|
||||
0xBA 0x2568 # FORMS UP DOUBLE AND HORIZONTAL SINGLE
|
||||
0xBB 0x2569 # FORMS DOUBLE UP AND HORIZONTAL
|
||||
0xBC 0x256A # FORMS VERTICAL SINGLE AND HORIZONTAL DOUBLE
|
||||
0xBD 0x256B # FORMS VERTICAL DOUBLE AND HORIZONTAL SINGLE
|
||||
0xBE 0x256C # FORMS DOUBLE VERTICAL AND HORIZONTAL
|
||||
0xBF 0x00A9 # COPYRIGHT SIGN
|
||||
0xC0 0x044E # CYRILLIC SMALL LETTER IU
|
||||
0xC1 0x0430 # CYRILLIC SMALL LETTER A
|
||||
0xC2 0x0431 # CYRILLIC SMALL LETTER BE
|
||||
0xC3 0x0446 # CYRILLIC SMALL LETTER TSE
|
||||
0xC4 0x0434 # CYRILLIC SMALL LETTER DE
|
||||
0xC5 0x0435 # CYRILLIC SMALL LETTER IE
|
||||
0xC6 0x0444 # CYRILLIC SMALL LETTER EF
|
||||
0xC7 0x0433 # CYRILLIC SMALL LETTER GE
|
||||
0xC8 0x0445 # CYRILLIC SMALL LETTER KHA
|
||||
0xC9 0x0438 # CYRILLIC SMALL LETTER II
|
||||
0xCA 0x0439 # CYRILLIC SMALL LETTER SHORT II
|
||||
0xCB 0x043A # CYRILLIC SMALL LETTER KA
|
||||
0xCC 0x043B # CYRILLIC SMALL LETTER EL
|
||||
0xCD 0x043C # CYRILLIC SMALL LETTER EM
|
||||
0xCE 0x043D # CYRILLIC SMALL LETTER EN
|
||||
0xCF 0x043E # CYRILLIC SMALL LETTER O
|
||||
0xD0 0x043F # CYRILLIC SMALL LETTER PE
|
||||
0xD1 0x044F # CYRILLIC SMALL LETTER IA
|
||||
0xD2 0x0440 # CYRILLIC SMALL LETTER ER
|
||||
0xD3 0x0441 # CYRILLIC SMALL LETTER ES
|
||||
0xD4 0x0442 # CYRILLIC SMALL LETTER TE
|
||||
0xD5 0x0443 # CYRILLIC SMALL LETTER U
|
||||
0xD6 0x0436 # CYRILLIC SMALL LETTER ZHE
|
||||
0xD7 0x0432 # CYRILLIC SMALL LETTER VE
|
||||
0xD8 0x044C # CYRILLIC SMALL LETTER SOFT SIGN
|
||||
0xD9 0x044B # CYRILLIC SMALL LETTER YERI
|
||||
0xDA 0x0437 # CYRILLIC SMALL LETTER ZE
|
||||
0xDB 0x0448 # CYRILLIC SMALL LETTER SHA
|
||||
0xDC 0x044D # CYRILLIC SMALL LETTER REVERSED E
|
||||
0xDD 0x0449 # CYRILLIC SMALL LETTER SHCHA
|
||||
0xDE 0x0447 # CYRILLIC SMALL LETTER CHE
|
||||
0xDF 0x044A # CYRILLIC SMALL LETTER HARD SIGN
|
||||
0xE0 0x042E # CYRILLIC CAPITAL LETTER IU
|
||||
0xE1 0x0410 # CYRILLIC CAPITAL LETTER A
|
||||
0xE2 0x0411 # CYRILLIC CAPITAL LETTER BE
|
||||
0xE3 0x0426 # CYRILLIC CAPITAL LETTER TSE
|
||||
0xE4 0x0414 # CYRILLIC CAPITAL LETTER DE
|
||||
0xE5 0x0415 # CYRILLIC CAPITAL LETTER IE
|
||||
0xE6 0x0424 # CYRILLIC CAPITAL LETTER EF
|
||||
0xE7 0x0413 # CYRILLIC CAPITAL LETTER GE
|
||||
0xE8 0x0425 # CYRILLIC CAPITAL LETTER KHA
|
||||
0xE9 0x0418 # CYRILLIC CAPITAL LETTER II
|
||||
0xEA 0x0419 # CYRILLIC CAPITAL LETTER SHORT II
|
||||
0xEB 0x041A # CYRILLIC CAPITAL LETTER KA
|
||||
0xEC 0x041B # CYRILLIC CAPITAL LETTER EL
|
||||
0xED 0x041C # CYRILLIC CAPITAL LETTER EM
|
||||
0xEE 0x041D # CYRILLIC CAPITAL LETTER EN
|
||||
0xEF 0x041E # CYRILLIC CAPITAL LETTER O
|
||||
0xF0 0x041F # CYRILLIC CAPITAL LETTER PE
|
||||
0xF1 0x042F # CYRILLIC CAPITAL LETTER IA
|
||||
0xF2 0x0420 # CYRILLIC CAPITAL LETTER ER
|
||||
0xF3 0x0421 # CYRILLIC CAPITAL LETTER ES
|
||||
0xF4 0x0422 # CYRILLIC CAPITAL LETTER TE
|
||||
0xF5 0x0423 # CYRILLIC CAPITAL LETTER U
|
||||
0xF6 0x0416 # CYRILLIC CAPITAL LETTER ZHE
|
||||
0xF7 0x0412 # CYRILLIC CAPITAL LETTER VE
|
||||
0xF8 0x042C # CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
0xF9 0x042B # CYRILLIC CAPITAL LETTER YERI
|
||||
0xFA 0x0417 # CYRILLIC CAPITAL LETTER ZE
|
||||
0xFB 0x0428 # CYRILLIC CAPITAL LETTER SHA
|
||||
0xFC 0x042D # CYRILLIC CAPITAL LETTER REVERSED E
|
||||
0xFD 0x0429 # CYRILLIC CAPITAL LETTER SHCHA
|
||||
0xFE 0x0427 # CYRILLIC CAPITAL LETTER CHE
|
||||
0xFF 0x042A # CYRILLIC CAPITAL LETTER HARD SIGN
|
||||
@ -1,244 +0,0 @@
|
||||
# -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
# HAND MADE BY FRANK TANG <ftang@netscape.com>
|
||||
# BY REFERENCE RFC 2319
|
||||
# KOI8-U CHARSET
|
||||
#
|
||||
#
|
||||
0x20 0x0020 # SPACE
|
||||
0x21 0x0021 # EXCLAMATION MARK
|
||||
0x22 0x0022 # QUOTATION MARK
|
||||
0x23 0x0023 # NUMBER SIGN
|
||||
0x24 0x0024 # DOLLAR SIGN
|
||||
0x25 0x0025 # PERCENT SIGN
|
||||
0x26 0x0026 # AMPERSAND
|
||||
0x27 0x0027 # APOSTROPHE
|
||||
0x28 0x0028 # LEFT PARENTHESIS
|
||||
0x29 0x0029 # RIGHT PARENTHESIS
|
||||
0x2A 0x002A # ASTERISK
|
||||
0x2B 0x002B # PLUS SIGN
|
||||
0x2C 0x002C # COMMA
|
||||
0x2D 0x002D # HYPHEN-MINUS
|
||||
0x2E 0x002E # FULL STOP
|
||||
0x2F 0x002F # SOLIDUS
|
||||
0x30 0x0030 # DIGIT ZERO
|
||||
0x31 0x0031 # DIGIT ONE
|
||||
0x32 0x0032 # DIGIT TWO
|
||||
0x33 0x0033 # DIGIT THREE
|
||||
0x34 0x0034 # DIGIT FOUR
|
||||
0x35 0x0035 # DIGIT FIVE
|
||||
0x36 0x0036 # DIGIT SIX
|
||||
0x37 0x0037 # DIGIT SEVEN
|
||||
0x38 0x0038 # DIGIT EIGHT
|
||||
0x39 0x0039 # DIGIT NINE
|
||||
0x3A 0x003A # COLON
|
||||
0x3B 0x003B # SEMICOLON
|
||||
0x3C 0x003C # LESS-THAN SIGN
|
||||
0x3D 0x003D # EQUALS SIGN
|
||||
0x3E 0x003E # GREATER-THAN SIGN
|
||||
0x3F 0x003F # QUESTION MARK
|
||||
0x40 0x0040 # COMMERCIAL AT
|
||||
0x41 0x0041 # LATIN CAPITAL LETTER A
|
||||
0x42 0x0042 # LATIN CAPITAL LETTER B
|
||||
0x43 0x0043 # LATIN CAPITAL LETTER C
|
||||
0x44 0x0044 # LATIN CAPITAL LETTER D
|
||||
0x45 0x0045 # LATIN CAPITAL LETTER E
|
||||
0x46 0x0046 # LATIN CAPITAL LETTER F
|
||||
0x47 0x0047 # LATIN CAPITAL LETTER G
|
||||
0x48 0x0048 # LATIN CAPITAL LETTER H
|
||||
0x49 0x0049 # LATIN CAPITAL LETTER I
|
||||
0x4A 0x004A # LATIN CAPITAL LETTER J
|
||||
0x4B 0x004B # LATIN CAPITAL LETTER K
|
||||
0x4C 0x004C # LATIN CAPITAL LETTER L
|
||||
0x4D 0x004D # LATIN CAPITAL LETTER M
|
||||
0x4E 0x004E # LATIN CAPITAL LETTER N
|
||||
0x4F 0x004F # LATIN CAPITAL LETTER O
|
||||
0x50 0x0050 # LATIN CAPITAL LETTER P
|
||||
0x51 0x0051 # LATIN CAPITAL LETTER Q
|
||||
0x52 0x0052 # LATIN CAPITAL LETTER R
|
||||
0x53 0x0053 # LATIN CAPITAL LETTER S
|
||||
0x54 0x0054 # LATIN CAPITAL LETTER T
|
||||
0x55 0x0055 # LATIN CAPITAL LETTER U
|
||||
0x56 0x0056 # LATIN CAPITAL LETTER V
|
||||
0x57 0x0057 # LATIN CAPITAL LETTER W
|
||||
0x58 0x0058 # LATIN CAPITAL LETTER X
|
||||
0x59 0x0059 # LATIN CAPITAL LETTER Y
|
||||
0x5A 0x005A # LATIN CAPITAL LETTER Z
|
||||
0x5B 0x005B # LEFT SQUARE BRACKET
|
||||
0x5C 0x005C # REVERSE SOLIDUS
|
||||
0x5D 0x005D # RIGHT SQUARE BRACKET
|
||||
0x5E 0x005E # CIRCUMFLEX ACCENT
|
||||
0x5F 0x005F # LOW LINE
|
||||
0x60 0x0060 # GRAVE ACCENT
|
||||
0x61 0x0061 # LATIN SMALL LETTER A
|
||||
0x62 0x0062 # LATIN SMALL LETTER B
|
||||
0x63 0x0063 # LATIN SMALL LETTER C
|
||||
0x64 0x0064 # LATIN SMALL LETTER D
|
||||
0x65 0x0065 # LATIN SMALL LETTER E
|
||||
0x66 0x0066 # LATIN SMALL LETTER F
|
||||
0x67 0x0067 # LATIN SMALL LETTER G
|
||||
0x68 0x0068 # LATIN SMALL LETTER H
|
||||
0x69 0x0069 # LATIN SMALL LETTER I
|
||||
0x6A 0x006A # LATIN SMALL LETTER J
|
||||
0x6B 0x006B # LATIN SMALL LETTER K
|
||||
0x6C 0x006C # LATIN SMALL LETTER L
|
||||
0x6D 0x006D # LATIN SMALL LETTER M
|
||||
0x6E 0x006E # LATIN SMALL LETTER N
|
||||
0x6F 0x006F # LATIN SMALL LETTER O
|
||||
0x70 0x0070 # LATIN SMALL LETTER P
|
||||
0x71 0x0071 # LATIN SMALL LETTER Q
|
||||
0x72 0x0072 # LATIN SMALL LETTER R
|
||||
0x73 0x0073 # LATIN SMALL LETTER S
|
||||
0x74 0x0074 # LATIN SMALL LETTER T
|
||||
0x75 0x0075 # LATIN SMALL LETTER U
|
||||
0x76 0x0076 # LATIN SMALL LETTER V
|
||||
0x77 0x0077 # LATIN SMALL LETTER W
|
||||
0x78 0x0078 # LATIN SMALL LETTER X
|
||||
0x79 0x0079 # LATIN SMALL LETTER Y
|
||||
0x7A 0x007A # LATIN SMALL LETTER Z
|
||||
0x7B 0x007B # LEFT CURLY BRACKET
|
||||
0x7C 0x007C # VERTICAL LINE
|
||||
0x7D 0x007D # RIGHT CURLY BRACKET
|
||||
0x7E 0x007E # TILDE
|
||||
0x80 0x2500 # BOX DRAWINGS LIGHT HORIZONTAL
|
||||
0x81 0x2502 # BOX DRAWINGS LIGHT VERTICAL
|
||||
0x82 0x250C # BOX DRAWINGS LIGHT DOWN AND RIGHT
|
||||
0x83 0x2510 # BOX DRAWINGS LIGHT DOWN AND LEFT
|
||||
0x84 0x2514 # BOX DRAWINGS LIGHT UP AND RIGHT
|
||||
0x85 0x2518 # BOX DRAWINGS LIGHT UP AND LEFT
|
||||
0x86 0x251C # BOX DRAWINGS LIGHT VERTICAL AND RIGHT
|
||||
0x87 0x2524 # BOX DRAWINGS LIGHT VERTICAL AND LEFT
|
||||
0x88 0x252C # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
|
||||
0x89 0x2534 # BOX DRAWINGS LIGHT UP AND HORIZONTAL
|
||||
0x8A 0x253C # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
|
||||
0x8B 0x2580 # UPPER HALF BLOCK
|
||||
0x8C 0x2584 # LOWER HALF BLOCK
|
||||
0x8D 0x2588 # FULL BLOCK
|
||||
0x8E 0x258C # LEFT HALF BLOCK
|
||||
0x8F 0x2590 # RIGHT HALF BLOCK
|
||||
0x90 0x2591 # LIGHT SHADE
|
||||
0x91 0x2592 # MEDIUM SHADE
|
||||
0x92 0x2593 # DARK SHADE
|
||||
0x93 0x2320 # TOP HALF INTEGRAL
|
||||
0x94 0x25A0 # BLACK SQUARE
|
||||
0x95 0x2219 # BULLET OPERATOR
|
||||
0x96 0x221A # SQUARE ROOT
|
||||
0x97 0x2248 # ALMOST EQUAL TO
|
||||
0x98 0x2264 # LESS THAN OR EQUAL TO
|
||||
0x99 0x2265 # GREATER THAN OR EQUAL TO
|
||||
0x9A 0x00A0 # NO-BREAK SPACE
|
||||
0x9B 0x2321 # BOTTOM HALF INTEGRAL
|
||||
0x9C 0x00B0 # DEGREE SIGN
|
||||
0x9D 0x00B2 # SUPERSCRIPT TWO
|
||||
0x9E 0x00B7 # MIDDLE DOT
|
||||
0x9F 0x00F7 # DIVISION SIGN
|
||||
0xA0 0x2550 # BOX DRAWINGS DOUBLE HORIZONTAL
|
||||
0xA1 0x2551 # BOX DRAWINGS DOUBLE VERTICAL
|
||||
0xA2 0x2552 # BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
|
||||
0xA3 0x0451 # CYRILLIC SMALL LETTER IO
|
||||
0xA4 0x0454 # CYRILLIC SMALL LETTER UKRAINIAN IE
|
||||
0xA5 0x2554 # BOX DRAWINGS DOUBLE DOWN AND RIGHT
|
||||
0xA6 0x0456 # CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
0xA7 0x0457 # CYRILLIC SMALL LETTER YI (UKRAINIAN)
|
||||
0xA8 0x2557 # BOX DRAWINGS DOUBLE DOWN AND LEFT
|
||||
0xA9 0x2558 # BOX DRAWINGS0xP SINGLE AND RIGHT DOUBLE
|
||||
0xAA 0x2559 # BOX DRAWINGS0xP DOUBLE AND RIGHT SINGLE
|
||||
0xAB 0x255A # BOX DRAWINGS DOUBLE UP AND RIGHT
|
||||
0xAC 0x255B # BOX DRAWINGS0xP SINGLE AND LEFT DOUBLE
|
||||
0xAD 0x0491 # CYRILLIC SMALL LETTER GHE WITH UPTURN
|
||||
0xAE 0x255D # BOX DRAWINGS DOUBLE UP AND LEFT
|
||||
0xAF 0x255E # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
|
||||
0xB0 0x255F # BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
|
||||
0xB1 0x2560 # BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
|
||||
0xB2 0x2561 # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
|
||||
0xB3 0x0401 # CYRILLIC CAPITAL LETTER IO
|
||||
0xB4 0x0404 # CYRILLIC CAPITAL LETTER UKRAINIAN IE
|
||||
0xB5 0x2563 # BOX DRAWINGS DOUBLE VERTICAL AND LEFT
|
||||
0xB6 0x0406 # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
0xB7 0x0407 # CYRILLIC CAPITAL LETTER YI (UKRAINIAN)
|
||||
0xB8 0x2566 # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
|
||||
0xB9 0x2567 # BOX DRAWINGS0xP SINGLE AND HORIZONTAL DOUBLE
|
||||
0xBA 0x2568 # BOX DRAWINGS0xP DOUBLE AND HORIZONTAL SINGLE
|
||||
0xBB 0x2569 # BOX DRAWINGS DOUBLE UP AND HORIZONTAL
|
||||
0xBC 0x256A # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
|
||||
0xBD 0x0490 # CYRILLIC CAPITAL LETTER GHE WITH UPTURN
|
||||
0xBE 0x256C # BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
|
||||
0xBF 0x00A9 # COPYRIGHT SIGN
|
||||
0xC0 0x044E # CYRILLIC SMALL LETTER YU
|
||||
0xC1 0x0430 # CYRILLIC SMALL LETTER A
|
||||
0xC2 0x0431 # CYRILLIC SMALL LETTER BE
|
||||
0xC3 0x0446 # CYRILLIC SMALL LETTER TSE
|
||||
0xC4 0x0434 # CYRILLIC SMALL LETTER DE
|
||||
0xC5 0x0435 # CYRILLIC SMALL LETTER IE
|
||||
0xC6 0x0444 # CYRILLIC SMALL LETTER EF
|
||||
0xC7 0x0433 # CYRILLIC SMALL LETTER GHE
|
||||
0xC8 0x0445 # CYRILLIC SMALL LETTER KHA
|
||||
0xC9 0x0438 # CYRILLIC SMALL LETTER I
|
||||
0xCA 0x0439 # CYRILLIC SMALL LETTER SHORT I
|
||||
0xCB 0x043A # CYRILLIC SMALL LETTER KA
|
||||
0xCC 0x043B # CYRILLIC SMALL LETTER EL
|
||||
0xCD 0x043C # CYRILLIC SMALL LETTER EM
|
||||
0xCE 0x043D # CYRILLIC SMALL LETTER EN
|
||||
0xCF 0x043E # CYRILLIC SMALL LETTER O
|
||||
0xD0 0x043F # CYRILLIC SMALL LETTER PE
|
||||
0xD1 0x044F # CYRILLIC SMALL LETTER YA
|
||||
0xD2 0x0440 # CYRILLIC SMALL LETTER ER
|
||||
0xD3 0x0441 # CYRILLIC SMALL LETTER ES
|
||||
0xD4 0x0442 # CYRILLIC SMALL LETTER TE
|
||||
0xD5 0x0443 # CYRILLIC SMALL LETTER U
|
||||
0xD6 0x0436 # CYRILLIC SMALL LETTER ZHE
|
||||
0xD7 0x0432 # CYRILLIC SMALL LETTER VE
|
||||
0xD8 0x044C # CYRILLIC SMALL LETTER SOFT SIGN
|
||||
0xD9 0x044B # CYRILLIC SMALL LETTER YERU
|
||||
0xDA 0x0437 # CYRILLIC SMALL LETTER ZE
|
||||
0xDB 0x0448 # CYRILLIC SMALL LETTER SHA
|
||||
0xDC 0x044D # CYRILLIC SMALL LETTER E
|
||||
0xDD 0x0449 # CYRILLIC SMALL LETTER SHCHA
|
||||
0xDE 0x0447 # CYRILLIC SMALL LETTER CHE
|
||||
0xDF 0x044A # CYRILLIC SMALL LETTER HARD SIGN
|
||||
0xE0 0x042E # CYRILLIC CAPITAL LETTER YU
|
||||
0xE1 0x0410 # CYRILLIC CAPITAL LETTER A
|
||||
0xE2 0x0411 # CYRILLIC CAPITAL LETTER BE
|
||||
0xE3 0x0426 # CYRILLIC CAPITAL LETTER TSE
|
||||
0xE4 0x0414 # CYRILLIC CAPITAL LETTER DE
|
||||
0xE5 0x0415 # CYRILLIC CAPITAL LETTER IE
|
||||
0xE6 0x0424 # CYRILLIC CAPITAL LETTER EF
|
||||
0xE7 0x0413 # CYRILLIC CAPITAL LETTER GHE
|
||||
0xE8 0x0425 # CYRILLIC CAPITAL LETTER KHA
|
||||
0xE9 0x0418 # CYRILLIC CAPITAL LETTER I
|
||||
0xEA 0x0419 # CYRILLIC CAPITAL LETTER SHORT I
|
||||
0xEB 0x041A # CYRILLIC CAPITAL LETTER KA
|
||||
0xEC 0x041B # CYRILLIC CAPITAL LETTER EL
|
||||
0xED 0x041C # CYRILLIC CAPITAL LETTER EM
|
||||
0xEE 0x041D # CYRILLIC CAPITAL LETTER EN
|
||||
0xEF 0x041E # CYRILLIC CAPITAL LETTER O
|
||||
0xF0 0x041F # CYRILLIC CAPITAL LETTER PE
|
||||
0xF1 0x042F # CYRILLIC CAPITAL LETTER YA
|
||||
0xF2 0x0420 # CYRILLIC CAPITAL LETTER ER
|
||||
0xF3 0x0421 # CYRILLIC CAPITAL LETTER ES
|
||||
0xF4 0x0422 # CYRILLIC CAPITAL LETTER TE
|
||||
0xF5 0x0423 # CYRILLIC CAPITAL LETTER U
|
||||
0xF6 0x0416 # CYRILLIC CAPITAL LETTER ZHE
|
||||
0xF7 0x0412 # CYRILLIC CAPITAL LETTER VE
|
||||
0xF8 0x042C # CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
0xF9 0x042B # CYRILLIC CAPITAL LETTER YERU
|
||||
0xFA 0x0417 # CYRILLIC CAPITAL LETTER ZE
|
||||
0xFB 0x0428 # CYRILLIC CAPITAL LETTER SHA
|
||||
0xFC 0x042D # CYRILLIC CAPITAL LETTER E
|
||||
0xFD 0x0429 # CYRILLIC CAPITAL LETTER SHCHA
|
||||
0xFE 0x0427 # CYRILLIC CAPITAL LETTER CHE
|
||||
0xFF 0x042A # CYRILLIC CAPITAL LETTER HARD SIGN
|
||||
@ -1,390 +0,0 @@
|
||||
# -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
# HAND MADE BY FRANK TANG <ftang@netscape.com>
|
||||
# BY REFERENCE RFC 1489
|
||||
# KOI8-R CHARSET
|
||||
#
|
||||
#
|
||||
0x00 0x0000 #NULL
|
||||
0x01 0x0001 #START OF HEADING
|
||||
0x02 0x0002 #START OF TEXT
|
||||
0x03 0x0003 #END OF TEXT
|
||||
0x04 0x0004 #END OF TRANSMISSION
|
||||
0x05 0x0005 #ENQUIRY
|
||||
0x06 0x0006 #ACKNOWLEDGE
|
||||
0x07 0x0007 #BELL
|
||||
0x08 0x0008 #BACKSPACE
|
||||
0x09 0x0009 #HORIZONTAL TABULATION
|
||||
0x0A 0x000A #LINE FEED
|
||||
0x0B 0x000B #VERTICAL TABULATION
|
||||
0x0C 0x000C #FORM FEED
|
||||
0x0D 0x000D #CARRIAGE RETURN
|
||||
0x0E 0x000E #SHIFT OUT
|
||||
0x0F 0x000F #SHIFT IN
|
||||
0x10 0x0010 #DATA LINK ESCAPE
|
||||
0x11 0x0011 #DEVICE CONTROL ONE
|
||||
0x12 0x0012 #DEVICE CONTROL TWO
|
||||
0x13 0x0013 #DEVICE CONTROL THREE
|
||||
0x14 0x0014 #DEVICE CONTROL FOUR
|
||||
0x15 0x0015 #NEGATIVE ACKNOWLEDGE
|
||||
0x16 0x0016 #SYNCHRONOUS IDLE
|
||||
0x17 0x0017 #END OF TRANSMISSION BLOCK
|
||||
0x18 0x0018 #CANCEL
|
||||
0x19 0x0019 #END OF MEDIUM
|
||||
0x1A 0x001A #SUBSTITUTE
|
||||
0x1B 0x001B #ESCAPE
|
||||
0x1C 0x001C #FILE SEPARATOR
|
||||
0x1D 0x001D #GROUP SEPARATOR
|
||||
0x1E 0x001E #RECORD SEPARATOR
|
||||
0x1F 0x001F #UNIT SEPARATOR
|
||||
0x20 0x0020 #SPACE
|
||||
0x21 0x0021 #EXCLAMATION MARK
|
||||
0x22 0x0022 #QUOTATION MARK
|
||||
0x23 0x0023 #NUMBER SIGN
|
||||
0x24 0x0024 #DOLLAR SIGN
|
||||
0x25 0x0025 #PERCENT SIGN
|
||||
0x26 0x0026 #AMPERSAND
|
||||
0x27 0x0027 #APOSTROPHE
|
||||
0x28 0x0028 #LEFT PARENTHESIS
|
||||
0x29 0x0029 #RIGHT PARENTHESIS
|
||||
0x2A 0x002A #ASTERISK
|
||||
0x2B 0x002B #PLUS SIGN
|
||||
0x2C 0x002C #COMMA
|
||||
0x2D 0x002D #HYPHEN-MINUS
|
||||
0x2E 0x002E #FULL STOP
|
||||
0x2F 0x002F #SOLIDUS
|
||||
0x30 0x0030 #DIGIT ZERO
|
||||
0x31 0x0031 #DIGIT ONE
|
||||
0x32 0x0032 #DIGIT TWO
|
||||
0x33 0x0033 #DIGIT THREE
|
||||
0x34 0x0034 #DIGIT FOUR
|
||||
0x35 0x0035 #DIGIT FIVE
|
||||
0x36 0x0036 #DIGIT SIX
|
||||
0x37 0x0037 #DIGIT SEVEN
|
||||
0x38 0x0038 #DIGIT EIGHT
|
||||
0x39 0x0039 #DIGIT NINE
|
||||
0x3A 0x003A #COLON
|
||||
0x3B 0x003B #SEMICOLON
|
||||
0x3C 0x003C #LESS-THAN SIGN
|
||||
0x3D 0x003D #EQUALS SIGN
|
||||
0x3E 0x003E #GREATER-THAN SIGN
|
||||
0x3F 0x003F #QUESTION MARK
|
||||
0x40 0x0040 #COMMERCIAL AT
|
||||
0x41 0x0041 #LATIN CAPITAL LETTER A
|
||||
0x42 0x0042 #LATIN CAPITAL LETTER B
|
||||
0x43 0x0043 #LATIN CAPITAL LETTER C
|
||||
0x44 0x0044 #LATIN CAPITAL LETTER D
|
||||
0x45 0x0045 #LATIN CAPITAL LETTER E
|
||||
0x46 0x0046 #LATIN CAPITAL LETTER F
|
||||
0x47 0x0047 #LATIN CAPITAL LETTER G
|
||||
0x48 0x0048 #LATIN CAPITAL LETTER H
|
||||
0x49 0x0049 #LATIN CAPITAL LETTER I
|
||||
0x4A 0x004A #LATIN CAPITAL LETTER J
|
||||
0x4B 0x004B #LATIN CAPITAL LETTER K
|
||||
0x4C 0x004C #LATIN CAPITAL LETTER L
|
||||
0x4D 0x004D #LATIN CAPITAL LETTER M
|
||||
0x4E 0x004E #LATIN CAPITAL LETTER N
|
||||
0x4F 0x004F #LATIN CAPITAL LETTER O
|
||||
0x50 0x0050 #LATIN CAPITAL LETTER P
|
||||
0x51 0x0051 #LATIN CAPITAL LETTER Q
|
||||
0x52 0x0052 #LATIN CAPITAL LETTER R
|
||||
0x53 0x0053 #LATIN CAPITAL LETTER S
|
||||
0x54 0x0054 #LATIN CAPITAL LETTER T
|
||||
0x55 0x0055 #LATIN CAPITAL LETTER U
|
||||
0x56 0x0056 #LATIN CAPITAL LETTER V
|
||||
0x57 0x0057 #LATIN CAPITAL LETTER W
|
||||
0x58 0x0058 #LATIN CAPITAL LETTER X
|
||||
0x59 0x0059 #LATIN CAPITAL LETTER Y
|
||||
0x5A 0x005A #LATIN CAPITAL LETTER Z
|
||||
0x5B 0x005B #LEFT SQUARE BRACKET
|
||||
0x5C 0x005C #REVERSE SOLIDUS
|
||||
0x5D 0x005D #RIGHT SQUARE BRACKET
|
||||
0x5E 0x005E #CIRCUMFLEX ACCENT
|
||||
0x5F 0x005F #LOW LINE
|
||||
0x60 0x0060 #GRAVE ACCENT
|
||||
0x61 0x0061 #LATIN SMALL LETTER A
|
||||
0x62 0x0062 #LATIN SMALL LETTER B
|
||||
0x63 0x0063 #LATIN SMALL LETTER C
|
||||
0x64 0x0064 #LATIN SMALL LETTER D
|
||||
0x65 0x0065 #LATIN SMALL LETTER E
|
||||
0x66 0x0066 #LATIN SMALL LETTER F
|
||||
0x67 0x0067 #LATIN SMALL LETTER G
|
||||
0x68 0x0068 #LATIN SMALL LETTER H
|
||||
0x69 0x0069 #LATIN SMALL LETTER I
|
||||
0x6A 0x006A #LATIN SMALL LETTER J
|
||||
0x6B 0x006B #LATIN SMALL LETTER K
|
||||
0x6C 0x006C #LATIN SMALL LETTER L
|
||||
0x6D 0x006D #LATIN SMALL LETTER M
|
||||
0x6E 0x006E #LATIN SMALL LETTER N
|
||||
0x6F 0x006F #LATIN SMALL LETTER O
|
||||
0x70 0x0070 #LATIN SMALL LETTER P
|
||||
0x71 0x0071 #LATIN SMALL LETTER Q
|
||||
0x72 0x0072 #LATIN SMALL LETTER R
|
||||
0x73 0x0073 #LATIN SMALL LETTER S
|
||||
0x74 0x0074 #LATIN SMALL LETTER T
|
||||
0x75 0x0075 #LATIN SMALL LETTER U
|
||||
0x76 0x0076 #LATIN SMALL LETTER V
|
||||
0x77 0x0077 #LATIN SMALL LETTER W
|
||||
0x78 0x0078 #LATIN SMALL LETTER X
|
||||
0x79 0x0079 #LATIN SMALL LETTER Y
|
||||
0x7A 0x007A #LATIN SMALL LETTER Z
|
||||
0x7B 0x007B #LEFT CURLY BRACKET
|
||||
0x7C 0x007C #VERTICAL LINE
|
||||
0x7D 0x007D #RIGHT CURLY BRACKET
|
||||
0x7E 0x007E #TILDE
|
||||
0x7F 0x007F #DELETE
|
||||
0xA0 0x00A0
|
||||
0xA1 0x00A1
|
||||
0xA2 0x00A2
|
||||
0xA3 0x00A3
|
||||
0xA4 0x0024
|
||||
0xA5 0x00A5
|
||||
0xA7 0x00A7
|
||||
0xA9 0x2018
|
||||
0xAA 0x201C
|
||||
0xAB 0x00AB
|
||||
0xAC 0x2190
|
||||
0xAD 0x2191
|
||||
0xAE 0x2192
|
||||
0xAF 0x2193
|
||||
0xB0 0x00B0
|
||||
0xB1 0x00B1
|
||||
0xB2 0x00B2
|
||||
0xB3 0x00B3
|
||||
0xB4 0x00D7
|
||||
0xB5 0x00B5
|
||||
0xB6 0x00B6
|
||||
0xB7 0x00B7
|
||||
0xB8 0x00F7
|
||||
0xB9 0x2019
|
||||
0xBA 0x201D
|
||||
0xBB 0x00BB
|
||||
0xBC 0x00BC
|
||||
0xBD 0x00BD
|
||||
0xBE 0x00BE
|
||||
0xBF 0x00BF
|
||||
0xD0 0x2015
|
||||
0xD1 0x00B9
|
||||
0xD2 0x00AE
|
||||
0xD3 0x00A9
|
||||
0xD4 0x2122
|
||||
0xD5 0x266A
|
||||
0xD6 0x00AC
|
||||
0xD7 0x00A6
|
||||
0xDC 0x215B
|
||||
0xDD 0x215C
|
||||
0xDE 0x215D
|
||||
0xDF 0x215E
|
||||
0xE0 0x2126
|
||||
0xE1 0x00C6
|
||||
0xE2 0x0110
|
||||
0xE3 0x00AA
|
||||
0xE4 0x0126
|
||||
0xE6 0x0132
|
||||
0xE7 0x013F
|
||||
0xE8 0x0141
|
||||
0xE9 0x00D8
|
||||
0xEA 0x0152
|
||||
0xEB 0x00BA
|
||||
0xEC 0x00DE
|
||||
0xED 0x0166
|
||||
0xEE 0x014A
|
||||
0xEF 0x0149
|
||||
0xF0 0x0138
|
||||
0xF1 0x00E6
|
||||
0xF2 0x0111
|
||||
0xF3 0x00F0
|
||||
0xF4 0x0127
|
||||
0xF5 0x0131
|
||||
0xF6 0x0133
|
||||
0xF7 0x0140
|
||||
0xF8 0x0142
|
||||
0xF9 0x00F8
|
||||
0xFA 0x0153
|
||||
0xFB 0x00DF
|
||||
0xFC 0x00FE
|
||||
0xFD 0x0167
|
||||
0xFE 0x014B
|
||||
0xFF 0x00AD
|
||||
0xC120 0x0060
|
||||
0xC141 0x00C0
|
||||
0xC145 0x00C8
|
||||
0xC149 0x00CC
|
||||
0xC14F 0x00D2
|
||||
0xC155 0x00D9
|
||||
0xC161 0x00E0
|
||||
0xC165 0x00E8
|
||||
0xC169 0x00EC
|
||||
0xC16F 0x00F2
|
||||
0xC175 0x00F9
|
||||
0xC220 0x00B4
|
||||
0xC241 0x00C1
|
||||
0xC243 0x0106
|
||||
0xC245 0x00C9
|
||||
0xC249 0x00CD
|
||||
0xC24C 0x0139
|
||||
0xC24E 0x0143
|
||||
0xC24F 0x00D3
|
||||
0xC252 0x0154
|
||||
0xC253 0x015A
|
||||
0xC255 0x00DA
|
||||
0xC259 0x00DD
|
||||
0xC25A 0x017B
|
||||
0xC261 0x00E1
|
||||
0xC263 0x0107
|
||||
0xC265 0x00E9
|
||||
0xC267 0x01F5
|
||||
0xC269 0x00ED
|
||||
0xC26C 0x013A
|
||||
0xC26E 0x0144
|
||||
0xC26F 0x00F3
|
||||
0xC272 0x0155
|
||||
0xC273 0x015B
|
||||
0xC275 0x00FA
|
||||
0xC279 0x00FD
|
||||
0xC27A 0x017A
|
||||
0xC320 0x005E
|
||||
0xC341 0x00C2
|
||||
0xC343 0x0108
|
||||
0xC345 0x00CA
|
||||
0xC347 0x011C
|
||||
0xC348 0x0124
|
||||
0xC349 0x00CE
|
||||
0xC34A 0x0134
|
||||
0xC34F 0x00D4
|
||||
0xC353 0x015C
|
||||
0xC355 0x00DB
|
||||
0xC357 0x0174
|
||||
0xC359 0x0176
|
||||
0xC361 0x00E2
|
||||
0xC363 0x0109
|
||||
0xC365 0x00EA
|
||||
0xC367 0x011D
|
||||
0xC368 0x0125
|
||||
0xC369 0x00EE
|
||||
0xC36A 0x0135
|
||||
0xC36F 0x00F4
|
||||
0xC373 0x015D
|
||||
0xC375 0x00FB
|
||||
0xC377 0x0175
|
||||
0xC379 0x0177
|
||||
0xC420 0x007E
|
||||
0xC441 0x00C3
|
||||
0xC449 0x0128
|
||||
0xC44E 0x00D1
|
||||
0xC44F 0x00D5
|
||||
0xC455 0x0168
|
||||
0xC461 0x00E3
|
||||
0xC469 0x0129
|
||||
0xC46E 0x00F1
|
||||
0xC46F 0x00F5
|
||||
0xC475 0x0169
|
||||
0xC520 0x00AF
|
||||
0xC541 0x0100
|
||||
0xC545 0x0112
|
||||
0xC549 0x012A
|
||||
0xC54F 0x014C
|
||||
0xC555 0x016A
|
||||
0xC561 0x0101
|
||||
0xC565 0x0113
|
||||
0xC569 0x012B
|
||||
0xC56F 0x014D
|
||||
0xC575 0x016B
|
||||
0xC620 0x02D8
|
||||
0xC641 0x0102
|
||||
0xC647 0x011E
|
||||
0xC655 0x016C
|
||||
0xC661 0x0103
|
||||
0xC667 0x011F
|
||||
0xC675 0x016D
|
||||
0xC720 0x02D9
|
||||
0xC743 0x010A
|
||||
0xC745 0x0116
|
||||
0xC747 0x0120
|
||||
0xC749 0x0130
|
||||
0xC75A 0x017B
|
||||
0xC763 0x010B
|
||||
0xC765 0x0117
|
||||
0xC767 0x0121
|
||||
0xC77A 0x017C
|
||||
0xC820 0x00A8
|
||||
0xC841 0x00C4
|
||||
0xC845 0x00CB
|
||||
0xC849 0x00CF
|
||||
0xC84F 0x00D6
|
||||
0xC855 0x00DC
|
||||
0xC859 0x0178
|
||||
0xC861 0x00E4
|
||||
0xC865 0x00EB
|
||||
0xC869 0x00EF
|
||||
0xC86F 0x00F6
|
||||
0xC875 0x00FC
|
||||
0xC879 0x00FF
|
||||
0xCA20 0x02DA
|
||||
0xCA41 0x00C5
|
||||
0xCA55 0x016E
|
||||
0xCA61 0x00E5
|
||||
0xCA75 0x016F
|
||||
0xCB20 0x00B8
|
||||
0xCB43 0x00C7
|
||||
0xCB47 0x0122
|
||||
0xCB4B 0x0136
|
||||
0xCB4C 0x013B
|
||||
0xCB52 0x0156
|
||||
0xCB53 0x015E
|
||||
0xCB54 0x0162
|
||||
0xCB63 0x00E7
|
||||
0xCB6B 0x0137
|
||||
0xCB6C 0x013C
|
||||
0xCB6E 0x0146
|
||||
0xCB72 0x0157
|
||||
0xCB73 0x015F
|
||||
0xCB74 0x0163
|
||||
0xCD20 0x02DD
|
||||
0xCD4F 0x0150
|
||||
0xCD55 0x0170
|
||||
0xCD6F 0x0151
|
||||
0xCD75 0x0171
|
||||
0xCE20 0x02DB
|
||||
0xCE41 0x0104
|
||||
0xCE45 0x0118
|
||||
0xCE49 0x012E
|
||||
0xCE55 0x0172
|
||||
0xCE61 0x0105
|
||||
0xCE65 0x0119
|
||||
0xCE69 0x012F
|
||||
0xCE75 0x0173
|
||||
0xCF20 0x02C7
|
||||
0xCF43 0x010C
|
||||
0xCF44 0x010E
|
||||
0xCF45 0x011A
|
||||
0xCF4C 0x013D
|
||||
0xCF4E 0x0147
|
||||
0xCF52 0x0158
|
||||
0xCF53 0x0160
|
||||
0xCF54 0x0164
|
||||
0xCF5A 0x017D
|
||||
0xCF63 0x010D
|
||||
0xCF64 0x010F
|
||||
0xCF65 0x011B
|
||||
0xCF6C 0x013E
|
||||
0xCF6E 0x0148
|
||||
0xCF72 0x0159
|
||||
0xCF73 0x0161
|
||||
0xCF74 0x0165
|
||||
0xCF7A 0x017E
|
||||
@ -1,277 +0,0 @@
|
||||
# -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
# Conversion Table for TCVN 5712:1993 (VN-1) to ISO 10646/Unicode
|
||||
# Origional HTML format in
|
||||
# http://www.geocities.com/SiliconValley/Lab/7929/5712map.html
|
||||
#
|
||||
0x00 0x0000 # NULL
|
||||
0x01 0x00da # LATIN CAPITAL LETTER U WITH ACUTE
|
||||
0x02 0x1ee4 # LATIN CAPITAL LETTER U WITH DOT BELOW
|
||||
0x03 0x0003 # END OF TEXT
|
||||
0x04 0x1eea # LATIN CAPITAL LETTER U WITH HORN AND GRAVE
|
||||
0x05 0x1eec # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE
|
||||
0x06 0x1eee # LATIN CAPITAL LETTER U WITH HORN AND TILDE
|
||||
0x07 0x0007 # BELL
|
||||
0x08 0x0008 # BACKSPACE
|
||||
0x09 0x0009 # HORIZONTAL TABULATION
|
||||
0x0a 0x000a # LINE FEED
|
||||
0x0b 0x000b # VERTICAL TABULATION
|
||||
0x0c 0x000c # FORM FEED
|
||||
0x0d 0x000d # CARRIAGE RETURN
|
||||
0x0e 0x000e # SHIFT OUT
|
||||
0x0f 0x000f # SHIFT IN
|
||||
0x10 0x0010 # DATA LINK ESCAPE
|
||||
0x11 0x1ee8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE
|
||||
0x12 0x1ef0 # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW
|
||||
0x13 0x1ef2 # LATIN CAPITAL LETTER Y WITH GRAVE
|
||||
0x14 0x1ef6 # LATIN CAPITAL LETTER Y WITH HOOK ABOVE
|
||||
0x15 0x1ef8 # LATIN CAPITAL LETTER Y WITH TILDE
|
||||
0x16 0x00dd # LATIN CAPITAL LETTER Y WITH ACUTE
|
||||
0x17 0x1ef4 # LATIN CAPITAL LETTER Y WITH DOT BELOW
|
||||
0x18 0x0018 # CANCEL
|
||||
0x19 0x0019 # END OF MEDIUM
|
||||
0x1a 0x001a # SUBSTITUTE
|
||||
0x1b 0x001b # ESCAPE
|
||||
0x1c 0x001c # FILE SEPARATOR
|
||||
0x1d 0x001d # GROUP SEPARATOR
|
||||
0x1e 0x001e # RECORD SEPARATOR
|
||||
0x1f 0x001f # UNIT SEPARATOR
|
||||
0x20 0x0020 # SPACE
|
||||
0x21 0x0021 # EXCLAMATION MARK
|
||||
0x22 0x0022 # QUOTATION MARK
|
||||
0x23 0x0023 # NUMBER SIGN
|
||||
0x24 0x0024 # DOLLAR SIGN
|
||||
0x25 0x0025 # PERCENT SIGN
|
||||
0x26 0x0026 # AMPERSAND
|
||||
0x27 0x0027 # APOSTROPHE
|
||||
0x28 0x0028 # LEFT PARENTHESIS
|
||||
0x29 0x0029 # RIGHT PARENTHESIS
|
||||
0x2a 0x002a # ASTERISK
|
||||
0x2b 0x002b # PLUS SIGN
|
||||
0x2c 0x002c # COMMA
|
||||
0x2d 0x002d # HYPHEN-MINUS
|
||||
0x2e 0x002e # FULL STOP
|
||||
0x2f 0x002f # SOLIDUS
|
||||
0x30 0x0030 # DIGIT ZERO
|
||||
0x31 0x0031 # DIGIT ONE
|
||||
0x32 0x0032 # DIGIT TWO
|
||||
0x33 0x0033 # DIGIT THREE
|
||||
0x34 0x0034 # DIGIT FOUR
|
||||
0x35 0x0035 # DIGIT FIVE
|
||||
0x36 0x0036 # DIGIT SIX
|
||||
0x37 0x0037 # DIGIT SEVEN
|
||||
0x38 0x0038 # DIGIT EIGHT
|
||||
0x39 0x0039 # DIGIT NINE
|
||||
0x3a 0x003a # COLON
|
||||
0x3b 0x003b # SEMICOLON
|
||||
0x3c 0x003c # LESS-THAN SIGN
|
||||
0x3d 0x003d # EQUALS SIGN
|
||||
0x3e 0x003e # GREATER-THAN SIGN
|
||||
0x3f 0x003f # QUESTION MARK
|
||||
0x40 0x0040 # COMMERCIAL AT
|
||||
0x41 0x0041 # LATIN CAPITAL LETTER A
|
||||
0x42 0x0042 # LATIN CAPITAL LETTER B
|
||||
0x43 0x0043 # LATIN CAPITAL LETTER C
|
||||
0x44 0x0044 # LATIN CAPITAL LETTER D
|
||||
0x45 0x0045 # LATIN CAPITAL LETTER E
|
||||
0x46 0x0046 # LATIN CAPITAL LETTER F
|
||||
0x47 0x0047 # LATIN CAPITAL LETTER G
|
||||
0x48 0x0048 # LATIN CAPITAL LETTER H
|
||||
0x49 0x0049 # LATIN CAPITAL LETTER I
|
||||
0x4a 0x004a # LATIN CAPITAL LETTER J
|
||||
0x4b 0x004b # LATIN CAPITAL LETTER K
|
||||
0x4c 0x004c # LATIN CAPITAL LETTER L
|
||||
0x4d 0x004d # LATIN CAPITAL LETTER M
|
||||
0x4e 0x004e # LATIN CAPITAL LETTER N
|
||||
0x4f 0x004f # LATIN CAPITAL LETTER O
|
||||
0x50 0x0050 # LATIN CAPITAL LETTER P
|
||||
0x51 0x0051 # LATIN CAPITAL LETTER Q
|
||||
0x52 0x0052 # LATIN CAPITAL LETTER R
|
||||
0x53 0x0053 # LATIN CAPITAL LETTER S
|
||||
0x54 0x0054 # LATIN CAPITAL LETTER T
|
||||
0x55 0x0055 # LATIN CAPITAL LETTER U
|
||||
0x56 0x0056 # LATIN CAPITAL LETTER V
|
||||
0x57 0x0057 # LATIN CAPITAL LETTER W
|
||||
0x58 0x0058 # LATIN CAPITAL LETTER X
|
||||
0x59 0x0059 # LATIN CAPITAL LETTER Y
|
||||
0x5a 0x005a # LATIN CAPITAL LETTER Z
|
||||
0x5b 0x005b # LEFT SQUARE BRACKET
|
||||
0x5c 0x005c # REVERSE SOLIDUS
|
||||
0x5d 0x005d # RIGHT SQUARE BRACKET
|
||||
0x5e 0x005e # CIRCUMFLEX ACCENT
|
||||
0x5f 0x005f # LOW LINE
|
||||
0x60 0x0060 # GRAVE ACCENT
|
||||
0x61 0x0061 # LATIN SMALL LETTER A
|
||||
0x62 0x0062 # LATIN SMALL LETTER B
|
||||
0x63 0x0063 # LATIN SMALL LETTER C
|
||||
0x64 0x0064 # LATIN SMALL LETTER D
|
||||
0x65 0x0065 # LATIN SMALL LETTER E
|
||||
0x66 0x0066 # LATIN SMALL LETTER F
|
||||
0x67 0x0067 # LATIN SMALL LETTER G
|
||||
0x68 0x0068 # LATIN SMALL LETTER H
|
||||
0x69 0x0069 # LATIN SMALL LETTER I
|
||||
0x6a 0x006a # LATIN SMALL LETTER J
|
||||
0x6b 0x006b # LATIN SMALL LETTER K
|
||||
0x6c 0x006c # LATIN SMALL LETTER L
|
||||
0x6d 0x006d # LATIN SMALL LETTER M
|
||||
0x6e 0x006e # LATIN SMALL LETTER N
|
||||
0x6f 0x006f # LATIN SMALL LETTER O
|
||||
0x70 0x0070 # LATIN SMALL LETTER P
|
||||
0x71 0x0071 # LATIN SMALL LETTER Q
|
||||
0x72 0x0072 # LATIN SMALL LETTER R
|
||||
0x73 0x0073 # LATIN SMALL LETTER S
|
||||
0x74 0x0074 # LATIN SMALL LETTER T
|
||||
0x75 0x0075 # LATIN SMALL LETTER U
|
||||
0x76 0x0076 # LATIN SMALL LETTER V
|
||||
0x77 0x0077 # LATIN SMALL LETTER W
|
||||
0x78 0x0078 # LATIN SMALL LETTER X
|
||||
0x79 0x0079 # LATIN SMALL LETTER Y
|
||||
0x7a 0x007a # LATIN SMALL LETTER Z
|
||||
0x7b 0x007b # LEFT CURLY BRACKET
|
||||
0x7c 0x007c # VERTICAL LINE
|
||||
0x7d 0x007d # RIGHT CURLY BRACKET
|
||||
0x7e 0x007e # TILDE
|
||||
0x7f 0x007f # DELETE
|
||||
0x80 0x00c0 # LATIN CAPITAL LETTER A WITH GRAVE
|
||||
0x81 0x1ea2 # LATIN CAPITAL LETTER A WITH HOOK ABOVE
|
||||
0x82 0x00c3 # LATIN CAPITAL LETTER A WITH TILDE
|
||||
0x83 0x00c1 # LATIN CAPITAL LETTER A WITH ACUTE
|
||||
0x84 0x1ea0 # LATIN CAPITAL LETTER A WITH DOT BELOW
|
||||
0x85 0x1eb6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW
|
||||
0x86 0x1eac # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW
|
||||
0x87 0x00c8 # LATIN CAPITAL LETTER E WITH GRAVE
|
||||
0x88 0x1eba # LATIN CAPITAL LETTER E WITH HOOK ABOVE
|
||||
0x89 0x1ebc # LATIN CAPITAL LETTER E WITH TILDE
|
||||
0x8a 0x00c9 # LATIN CAPITAL LETTER E WITH ACUTE
|
||||
0x8b 0x1eb8 # LATIN CAPITAL LETTER E WITH DOT BELOW
|
||||
0x8c 0x1ec6 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW
|
||||
0x8d 0x00cc # LATIN CAPITAL LETTER I WITH GRAVE
|
||||
0x8e 0x1ec8 # LATIN CAPITAL LETTER I WITH HOOK ABOVE
|
||||
0x8f 0x0128 # LATIN CAPITAL LETTER I WITH TILDE
|
||||
0x90 0x00cd # LATIN CAPITAL LETTER I WITH ACUTE
|
||||
0x91 0x1eca # LATIN CAPITAL LETTER I WITH DOT BELOW
|
||||
0x92 0x00d2 # LATIN CAPITAL LETTER O WITH GRAVE
|
||||
0x93 0x1ece # LATIN CAPITAL LETTER O WITH HOOK ABOVE
|
||||
0x94 0x00d5 # LATIN CAPITAL LETTER O WITH TILDE
|
||||
0x95 0x00d3 # LATIN CAPITAL LETTER O WITH ACUTE
|
||||
0x96 0x1ecc # LATIN CAPITAL LETTER O WITH DOT BELOW
|
||||
0x97 0x1ed8 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW
|
||||
0x98 0x1edc # LATIN CAPITAL LETTER O WITH HORN AND GRAVE
|
||||
0x99 0x1ede # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE
|
||||
0x9a 0x1ee0 # LATIN CAPITAL LETTER O WITH HORN AND TILDE
|
||||
0x9b 0x1eda # LATIN CAPITAL LETTER O WITH HORN AND ACUTE
|
||||
0x9c 0x1ee2 # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW
|
||||
0x9d 0x00d9 # LATIN CAPITAL LETTER U WITH GRAVE
|
||||
0x9e 0x1ee6 # LATIN CAPITAL LETTER U WITH HOOK ABOVE
|
||||
0x9f 0x0168 # LATIN CAPITAL LETTER U WITH TILDE
|
||||
0xa0 0x00a0 # NO-BREAK SPACE
|
||||
0xa1 0x0102 # LATIN CAPITAL LETTER A WITH BREVE
|
||||
0xa2 0x00c2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
|
||||
0xa3 0x00ca # LATIN CAPITAL LETTER E WITH CIRCUMFLEX
|
||||
0xa4 0x00d4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
|
||||
0xa5 0x01a0 # LATIN CAPITAL LETTER O WITH HORN
|
||||
0xa6 0x01af # LATIN CAPITAL LETTER U WITH HORN
|
||||
0xa7 0x0110 # LATIN CAPITAL LETTER D WITH STROKE
|
||||
0xa8 0x0103 # LATIN SMALL LETTER A WITH BREVE
|
||||
0xa9 0x00e2 # LATIN SMALL LETTER A WITH CIRCUMFLEX
|
||||
0xaa 0x00ea # LATIN SMALL LETTER E WITH CIRCUMFLEX
|
||||
0xab 0x00f4 # LATIN SMALL LETTER O WITH CIRCUMFLEX
|
||||
0xac 0x01a1 # LATIN SMALL LETTER O WITH HORN
|
||||
0xad 0x01b0 # LATIN SMALL LETTER U WITH HORN
|
||||
0xae 0x0111 # LATIN SMALL LETTER D WITH STROKE
|
||||
0xaf 0x1eb0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE
|
||||
0xb0 0x0300 # COMBINING GRAVE ACCENT
|
||||
0xb1 0x0309 # COMBINING HOOK ABOVE
|
||||
0xb2 0x0303 # COMBINING TILDE
|
||||
0xb3 0x0301 # COMBINING ACUTE ACCENT
|
||||
0xb4 0x0323 # COMBINING DOT BELOW
|
||||
0xb5 0x00e0 # LATIN SMALL LETTER A WITH GRAVE
|
||||
0xb6 0x1ea3 # LATIN SMALL LETTER A WITH HOOK ABOVE
|
||||
0xb7 0x00e3 # LATIN SMALL LETTER A WITH TILDE
|
||||
0xb8 0x00e1 # LATIN SMALL LETTER A WITH ACUTE
|
||||
0xb9 0x1ea1 # LATIN SMALL LETTER A WITH DOT BELOW
|
||||
0xba 0x1eb2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE
|
||||
0xbb 0x1eb1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE
|
||||
0xbc 0x1eb3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE
|
||||
0xbd 0x1eb5 # LATIN SMALL LETTER A WITH BREVE AND TILDE
|
||||
0xbe 0x1eaf # LATIN SMALL LETTER A WITH BREVE AND ACUTE
|
||||
0xbf 0x1eb4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE
|
||||
0xc0 0x1eae # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE
|
||||
0xc1 0x1ea6 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE
|
||||
0xc2 0x1ea8 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
|
||||
0xc3 0x1eaa # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE
|
||||
0xc4 0x1ea4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE
|
||||
0xc5 0x1ec0 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE
|
||||
0xc6 0x1eb7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW
|
||||
0xc7 0x1ea7 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE
|
||||
0xc8 0x1ea9 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
|
||||
0xc9 0x1eab # LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE
|
||||
0xca 0x1ea5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE
|
||||
0xcb 0x1ead # LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW
|
||||
0xcc 0x00e8 # LATIN SMALL LETTER E WITH GRAVE
|
||||
0xcd 0x1ec2 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
|
||||
0xce 0x1ebb # LATIN SMALL LETTER E WITH HOOK ABOVE
|
||||
0xcf 0x1ebd # LATIN SMALL LETTER E WITH TILDE
|
||||
0xd0 0x00e9 # LATIN SMALL LETTER E WITH ACUTE
|
||||
0xd1 0x1eb9 # LATIN SMALL LETTER E WITH DOT BELOW
|
||||
0xd2 0x1ec1 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE
|
||||
0xd3 0x1ec3 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
|
||||
0xd4 0x1ec5 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE
|
||||
0xd5 0x1ebf # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE
|
||||
0xd6 0x1ec7 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW
|
||||
0xd7 0x00ec # LATIN SMALL LETTER I WITH GRAVE
|
||||
0xd8 0x1ec9 # LATIN SMALL LETTER I WITH HOOK ABOVE
|
||||
0xd9 0x1ec4 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE
|
||||
0xda 0x1ebe # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE
|
||||
0xdb 0x1ed2 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE
|
||||
0xdc 0x0129 # LATIN SMALL LETTER I WITH TILDE
|
||||
0xdd 0x00ed # LATIN SMALL LETTER I WITH ACUTE
|
||||
0xde 0x1ecb # LATIN SMALL LETTER I WITH DOT BELOW
|
||||
0xdf 0x00f2 # LATIN SMALL LETTER O WITH GRAVE
|
||||
0xe0 0x1ed4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
|
||||
0xe1 0x1ecf # LATIN SMALL LETTER O WITH HOOK ABOVE
|
||||
0xe2 0x00f5 # LATIN SMALL LETTER O WITH TILDE
|
||||
0xe3 0x00f3 # LATIN SMALL LETTER O WITH ACUTE
|
||||
0xe4 0x1ecd # LATIN SMALL LETTER O WITH DOT BELOW
|
||||
0xe5 0x1ed3 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE
|
||||
0xe6 0x1ed5 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
|
||||
0xe7 0x1ed7 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE
|
||||
0xe8 0x1ed1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE
|
||||
0xe9 0x1ed9 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW
|
||||
0xea 0x1edd # LATIN SMALL LETTER O WITH HORN AND GRAVE
|
||||
0xeb 0x1edf # LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE
|
||||
0xec 0x1ee1 # LATIN SMALL LETTER O WITH HORN AND TILDE
|
||||
0xed 0x1edb # LATIN SMALL LETTER O WITH HORN AND ACUTE
|
||||
0xee 0x1ee3 # LATIN SMALL LETTER O WITH HORN AND DOT BELOW
|
||||
0xef 0x00f9 # LATIN SMALL LETTER U WITH GRAVE
|
||||
0xf0 0x1ed6 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE
|
||||
0xf1 0x1ee7 # LATIN SMALL LETTER U WITH HOOK ABOVE
|
||||
0xf2 0x0169 # LATIN SMALL LETTER U WITH TILDE
|
||||
0xf3 0x00fa # LATIN SMALL LETTER U WITH ACUTE
|
||||
0xf4 0x1ee5 # LATIN SMALL LETTER U WITH DOT BELOW
|
||||
0xf5 0x1eeb # LATIN SMALL LETTER U WITH HORN AND GRAVE
|
||||
0xf6 0x1eed # LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE
|
||||
0xf7 0x1eef # LATIN SMALL LETTER U WITH HORN AND TILDE
|
||||
0xf8 0x1ee9 # LATIN SMALL LETTER U WITH HORN AND ACUTE
|
||||
0xf9 0x1ef1 # LATIN SMALL LETTER U WITH HORN AND DOT BELOW
|
||||
0xfa 0x1ef3 # LATIN SMALL LETTER Y WITH GRAVE
|
||||
0xfb 0x1ef7 # LATIN SMALL LETTER Y WITH HOOK ABOVE
|
||||
0xfc 0x1ef9 # LATIN SMALL LETTER Y WITH TILDE
|
||||
0xfd 0x00fd # LATIN SMALL LETTER Y WITH ACUTE
|
||||
0xfe 0x1ef5 # LATIN SMALL LETTER Y WITH DOT BELOW
|
||||
0xff 0x1ed0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE
|
||||
@ -1,278 +0,0 @@
|
||||
# -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
# VISCII to Unicode conversion table
|
||||
# Submit by Thu Nguyen <tnn@neomagic.com>
|
||||
# Reference : http://www.vietstd.org/document/unicode.html
|
||||
#
|
||||
0x00 0x0000
|
||||
0x01 0x0001
|
||||
0x02 0x1EB2
|
||||
0x03 0x0003
|
||||
0x04 0x0004
|
||||
0x05 0x1EB4
|
||||
0x06 0x1EAA
|
||||
0x07 0x0007
|
||||
0x08 0x0008
|
||||
0x09 0x0009
|
||||
0x0A 0x000A
|
||||
0x0B 0x000B
|
||||
0x0C 0x000C
|
||||
0x0D 0x000D
|
||||
0x0E 0x000E
|
||||
0x0F 0x000F
|
||||
0x10 0x0010
|
||||
0x11 0x0011
|
||||
0x12 0x0012
|
||||
0x13 0x0013
|
||||
0x14 0x1EF6
|
||||
0x15 0x0015
|
||||
0x16 0x0016
|
||||
0x17 0x0017
|
||||
0x18 0x0018
|
||||
0x19 0x1EF8
|
||||
0x1A 0x001A
|
||||
0x1B 0x001B
|
||||
0x1C 0x001C
|
||||
0x1D 0x001D
|
||||
0x1E 0x1EF4
|
||||
0x1F 0x001F
|
||||
0x20 0x0020
|
||||
0x21 0x0021
|
||||
0x22 0x0022
|
||||
0x23 0x0023
|
||||
0x24 0x0024
|
||||
0x25 0x0025
|
||||
0x26 0x0026
|
||||
0x27 0x0027
|
||||
0x28 0x0028
|
||||
0x29 0x0029
|
||||
0x2A 0x002A
|
||||
0x2B 0x002B
|
||||
0x2C 0x002C
|
||||
0x2D 0x002D
|
||||
0x2E 0x002E
|
||||
0x2F 0x002F
|
||||
0x30 0x0030
|
||||
0x31 0x0031
|
||||
0x32 0x0032
|
||||
0x33 0x0033
|
||||
0x34 0x0034
|
||||
0x35 0x0035
|
||||
0x36 0x0036
|
||||
0x37 0x0037
|
||||
0x38 0x0038
|
||||
0x39 0x0039
|
||||
0x3A 0x003A
|
||||
0x3B 0x003B
|
||||
0x3C 0x003C
|
||||
0x3D 0x003D
|
||||
0x3E 0x003E
|
||||
0x3F 0x003F
|
||||
0x40 0x0040
|
||||
0x41 0x0041
|
||||
0x42 0x0042
|
||||
0x43 0x0043
|
||||
0x44 0x0044
|
||||
0x45 0x0045
|
||||
0x46 0x0046
|
||||
0x47 0x0047
|
||||
0x48 0x0048
|
||||
0x49 0x0049
|
||||
0x4A 0x004A
|
||||
0x4B 0x004B
|
||||
0x4C 0x004C
|
||||
0x4D 0x004D
|
||||
0x4E 0x004E
|
||||
0x4F 0x004F
|
||||
0x50 0x0050
|
||||
0x51 0x0051
|
||||
0x52 0x0052
|
||||
0x53 0x0053
|
||||
0x54 0x0054
|
||||
0x55 0x0055
|
||||
0x56 0x0056
|
||||
0x57 0x0057
|
||||
0x58 0x0058
|
||||
0x59 0x0059
|
||||
0x5A 0x005A
|
||||
0x5B 0x005B
|
||||
0x5C 0x005C
|
||||
0x5D 0x005D
|
||||
0x5E 0x005E
|
||||
0x5F 0x005F
|
||||
0x60 0x0060
|
||||
0x61 0x0061
|
||||
0x62 0x0062
|
||||
0x63 0x0063
|
||||
0x64 0x0064
|
||||
0x65 0x0065
|
||||
0x66 0x0066
|
||||
0x67 0x0067
|
||||
0x68 0x0068
|
||||
0x69 0x0069
|
||||
0x6A 0x006A
|
||||
0x6B 0x006B
|
||||
0x6C 0x006C
|
||||
0x6D 0x006D
|
||||
0x6E 0x006E
|
||||
0x6F 0x006F
|
||||
0x70 0x0070
|
||||
0x71 0x0071
|
||||
0x72 0x0072
|
||||
0x73 0x0073
|
||||
0x74 0x0074
|
||||
0x75 0x0075
|
||||
0x76 0x0076
|
||||
0x77 0x0077
|
||||
0x78 0x0078
|
||||
0x79 0x0079
|
||||
0x7A 0x007A
|
||||
0x7B 0x007B
|
||||
0x7C 0x007C
|
||||
0x7D 0x007D
|
||||
0x7E 0x007E
|
||||
0x7F 0x007F
|
||||
0x80 0x1EA0
|
||||
0x81 0x1EAE
|
||||
0x82 0x1EB0
|
||||
0x83 0x1EB6
|
||||
0x84 0x1EA4
|
||||
0x85 0x1EA6
|
||||
0x86 0x1EA8
|
||||
0x87 0x1EAC
|
||||
0x88 0x1EBC
|
||||
0x89 0x1EB8
|
||||
0x8A 0x1EBE
|
||||
0x8B 0x1EC0
|
||||
0x8C 0x1EC2
|
||||
0x8D 0x1EC4
|
||||
0x8E 0x1EC6
|
||||
0x8F 0x1ED0
|
||||
0x90 0x1ED2
|
||||
0x91 0x1ED4
|
||||
0x92 0x1ED6
|
||||
0x93 0x1ED8
|
||||
0x94 0x1EE2
|
||||
0x95 0x1EDA
|
||||
0x96 0x1EDC
|
||||
0x97 0x1EDE
|
||||
0x98 0x1ECA
|
||||
0x99 0x1ECE
|
||||
0x9A 0x1ECC
|
||||
0x9B 0x1EC8
|
||||
0x9C 0x1EE6
|
||||
0x9D 0x0168
|
||||
0x9E 0x1EE4
|
||||
0x9F 0x1EF2
|
||||
0xA0 0x00D5
|
||||
0xA1 0x1EAF
|
||||
0xA2 0x1EB1
|
||||
0xA3 0x1EB7
|
||||
0xA4 0x1EA5
|
||||
0xA5 0x1EA7
|
||||
0xA6 0x1EA9
|
||||
0xA7 0x1EAD
|
||||
0xA8 0x1EBD
|
||||
0xA9 0x1EB9
|
||||
0xAA 0x1EBF
|
||||
0xAB 0x1EC1
|
||||
0xAC 0x1EC3
|
||||
0xAD 0x1EC5
|
||||
0xAE 0x1EC7
|
||||
0xAF 0x1ED1
|
||||
0xB0 0x1ED3
|
||||
0xB1 0x1ED5
|
||||
0xB2 0x1ED7
|
||||
0xB3 0x1EE0
|
||||
0xB4 0x01A0
|
||||
0xB5 0x1ED9
|
||||
0xB6 0x1EDD
|
||||
0xB7 0x1EDF
|
||||
0xB8 0x1ECB
|
||||
0xB9 0x1EF0
|
||||
0xBA 0x1EE8
|
||||
0xBB 0x1EEA
|
||||
0xBC 0x1EEC
|
||||
0xBD 0x01A1
|
||||
0xBE 0x1EDB
|
||||
0xBF 0x01AF
|
||||
0xC0 0x00C0
|
||||
0xC1 0x00C1
|
||||
0xC2 0x00C2
|
||||
0xC3 0x00C3
|
||||
0xC4 0x1EA2
|
||||
0xC5 0x0102
|
||||
0xC6 0x1EB3
|
||||
0xC7 0x1EB5
|
||||
0xC8 0x00C8
|
||||
0xC9 0x00C9
|
||||
0xCA 0x00CA
|
||||
0xCB 0x1EBA
|
||||
0xCC 0x00CC
|
||||
0xCD 0x00CD
|
||||
0xCE 0x0128
|
||||
0xCF 0x1EF3
|
||||
0xD0 0x0110
|
||||
0xD1 0x1EE9
|
||||
0xD2 0x00D2
|
||||
0xD3 0x00D3
|
||||
0xD4 0x00D4
|
||||
0xD5 0x1EA1
|
||||
0xD6 0x1EF7
|
||||
0xD7 0x1EEB
|
||||
0xD8 0x1EED
|
||||
0xD9 0x00D9
|
||||
0xDA 0x00DA
|
||||
0xDB 0x1EF9
|
||||
0xDC 0x1EF5
|
||||
0xDD 0x00DD
|
||||
0xDE 0x1EE1
|
||||
0xDF 0x01B0
|
||||
0xE0 0x00E0
|
||||
0xE1 0x00E1
|
||||
0xE2 0x00E2
|
||||
0xE3 0x00E3
|
||||
0xE4 0x1EA3
|
||||
0xE5 0x0103
|
||||
0xE6 0x1EEF
|
||||
0xE7 0x1EAB
|
||||
0xE8 0x00E8
|
||||
0xE9 0x00E9
|
||||
0xEA 0x00EA
|
||||
0xEB 0x1EBB
|
||||
0xEC 0x00EC
|
||||
0xED 0x00ED
|
||||
0xEE 0x0129
|
||||
0xEF 0x1EC9
|
||||
0xF0 0x0111
|
||||
0xF1 0x1EF1
|
||||
0xF2 0x00F2
|
||||
0xF3 0x00F3
|
||||
0xF4 0x00F4
|
||||
0xF5 0x00F5
|
||||
0xF6 0x1ECF
|
||||
0xF7 0x1ECD
|
||||
0xF8 0x1EE5
|
||||
0xF9 0x00F9
|
||||
0xFA 0x00FA
|
||||
0xFB 0x0169
|
||||
0xFC 0x1EE7
|
||||
0xFD 0x00FD
|
||||
0xFE 0x1EE3
|
||||
0xFF 0x1EEE
|
||||
|
||||
@ -1,275 +0,0 @@
|
||||
# -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
# Submitted by Van Le <levan@hotmail.com> Aug 9, 1998
|
||||
#
|
||||
0x00 0x0000
|
||||
0x01 0x0001
|
||||
0x02 0x1ea0
|
||||
0x03 0x1eac
|
||||
0x04 0x1eb6
|
||||
0x05 0x1eb8
|
||||
0x06 0x1ec6
|
||||
0x07 0x0007
|
||||
0x08 0x0008
|
||||
0x09 0x0009
|
||||
0x0a 0x000a
|
||||
0x0b 0x000b
|
||||
0x0c 0x000c
|
||||
0x0d 0x000d
|
||||
0x0e 0x000e
|
||||
0x0f 0x000f
|
||||
0x10 0x1eca
|
||||
0x11 0x1ecc
|
||||
0x12 0x1ed8
|
||||
0x13 0x1ee2
|
||||
0x14 0x1ee4
|
||||
0x15 0x1ef0
|
||||
0x16 0x0016
|
||||
0x17 0x0017
|
||||
0x18 0x0018
|
||||
0x19 0x1ef4
|
||||
0x1a 0x001a
|
||||
0x1b 0x001b
|
||||
0x1c 0x1eaa
|
||||
0x1d 0x1eee
|
||||
0x1e 0x001e
|
||||
0x1f 0x001f
|
||||
0x20 0x0020
|
||||
0x21 0x0021
|
||||
0x22 0x0022
|
||||
0x23 0x0023
|
||||
0x24 0x0024
|
||||
0x25 0x0025
|
||||
0x26 0x0026
|
||||
0x27 0x0027
|
||||
0x28 0x0028
|
||||
0x29 0x0029
|
||||
0x2a 0x002a
|
||||
0x2b 0x002b
|
||||
0x2c 0x002c
|
||||
0x2d 0x002d
|
||||
0x2e 0x002e
|
||||
0x2f 0x002f
|
||||
0x30 0x0030
|
||||
0x31 0x0031
|
||||
0x32 0x0032
|
||||
0x33 0x0033
|
||||
0x34 0x0034
|
||||
0x35 0x0035
|
||||
0x36 0x0036
|
||||
0x37 0x0037
|
||||
0x38 0x0038
|
||||
0x39 0x0039
|
||||
0x3a 0x003a
|
||||
0x3b 0x003b
|
||||
0x3c 0x003c
|
||||
0x3d 0x003d
|
||||
0x3e 0x003e
|
||||
0x3f 0x003f
|
||||
0x40 0x0040
|
||||
0x41 0x0041
|
||||
0x42 0x0042
|
||||
0x43 0x0043
|
||||
0x44 0x0044
|
||||
0x45 0x0045
|
||||
0x46 0x0046
|
||||
0x47 0x0047
|
||||
0x48 0x0048
|
||||
0x49 0x0049
|
||||
0x4a 0x004a
|
||||
0x4b 0x004b
|
||||
0x4c 0x004c
|
||||
0x4d 0x004d
|
||||
0x4e 0x004e
|
||||
0x4f 0x004f
|
||||
0x50 0x0050
|
||||
0x51 0x0051
|
||||
0x52 0x0052
|
||||
0x53 0x0053
|
||||
0x54 0x0054
|
||||
0x55 0x0055
|
||||
0x56 0x0056
|
||||
0x57 0x0057
|
||||
0x58 0x0058
|
||||
0x59 0x0059
|
||||
0x5a 0x005a
|
||||
0x5b 0x005b
|
||||
0x5c 0x005c
|
||||
0x5d 0x005d
|
||||
0x5e 0x005e
|
||||
0x5f 0x005f
|
||||
0x60 0x0060
|
||||
0x61 0x0061
|
||||
0x62 0x0062
|
||||
0x63 0x0063
|
||||
0x64 0x0064
|
||||
0x65 0x0065
|
||||
0x66 0x0066
|
||||
0x67 0x0067
|
||||
0x68 0x0068
|
||||
0x69 0x0069
|
||||
0x6a 0x006a
|
||||
0x6b 0x006b
|
||||
0x6c 0x006c
|
||||
0x6d 0x006d
|
||||
0x6e 0x006e
|
||||
0x6f 0x006f
|
||||
0x70 0x0070
|
||||
0x71 0x0071
|
||||
0x72 0x0072
|
||||
0x73 0x0073
|
||||
0x74 0x0074
|
||||
0x75 0x0075
|
||||
0x76 0x0076
|
||||
0x77 0x0077
|
||||
0x78 0x0078
|
||||
0x79 0x0079
|
||||
0x7a 0x007a
|
||||
0x7b 0x007b
|
||||
0x7c 0x007c
|
||||
0x7d 0x007d
|
||||
0x7e 0x007e
|
||||
0x7f 0x007f
|
||||
0x80 0x00c0
|
||||
0x81 0x1ea2
|
||||
0x82 0x00c3
|
||||
0x83 0x1ea4
|
||||
0x84 0x1ea6
|
||||
0x85 0x1ea8
|
||||
0x86 0x1ecd
|
||||
0x87 0x1ed7
|
||||
0x88 0x0102
|
||||
0x89 0x1ebf
|
||||
0x8a 0x1ec1
|
||||
0x8b 0x1ec3
|
||||
0x8c 0x1ec7
|
||||
0x8d 0x1eae
|
||||
0x8e 0x1eb0
|
||||
0x8f 0x1eb2
|
||||
0x90 0x1ebe
|
||||
0x91 0x2018
|
||||
0x92 0x2019
|
||||
0x93 0x1ec0
|
||||
0x94 0x1ec2
|
||||
0x95 0x1ec4
|
||||
0x96 0x1ed0
|
||||
0x97 0x1ed2
|
||||
0x98 0x1ed4
|
||||
0x99 0x1ed6
|
||||
0x9a 0x00fd
|
||||
0x9b 0x1ef7
|
||||
0x9c 0x1ef5
|
||||
0x9d 0x1eda
|
||||
0x9e 0x1edc
|
||||
0x9f 0x1ede
|
||||
0xa0 0x00a0
|
||||
0xa1 0x1eaf
|
||||
0xa2 0x1eb1
|
||||
0xa3 0x1eb3
|
||||
0xa4 0x1eb5
|
||||
0xa5 0x1eb7
|
||||
0xa6 0x1ee0
|
||||
0xa7 0x1edb
|
||||
0xa8 0x00d9
|
||||
0xa9 0x1edd
|
||||
0xaa 0x1edf
|
||||
0xab 0x1ee1
|
||||
0xac 0x0168
|
||||
0xad 0x1ee8
|
||||
0xae 0x1ee3
|
||||
0xaf 0x1eea
|
||||
0xb0 0x1ed5
|
||||
0xb1 0x1eec
|
||||
0xb2 0x1ef2
|
||||
0xb3 0x1ef8
|
||||
0xb4 0x00cd
|
||||
0xb5 0x00cc
|
||||
0xb6 0x1ed9
|
||||
0xb7 0x1ec8
|
||||
0xb8 0x0128
|
||||
0xb9 0x00d3
|
||||
0xba 0x1eed
|
||||
0xbb 0x1eef
|
||||
0xbc 0x00d2
|
||||
0xbd 0x1ece
|
||||
0xbe 0x00d5
|
||||
0xbf 0x1ef1
|
||||
0xc0 0x1ea7
|
||||
0xc1 0x00c1
|
||||
0xc2 0x00c2
|
||||
0xc3 0x1ea5
|
||||
0xc4 0x1ea9
|
||||
0xc5 0x1eab
|
||||
0xc6 0x1ead
|
||||
0xc7 0x0111
|
||||
0xc8 0x1ebb
|
||||
0xc9 0x00c9
|
||||
0xca 0x00ca
|
||||
0xcb 0x1eb9
|
||||
0xcc 0x1ec9
|
||||
0xcd 0x1ec5
|
||||
0xce 0x1ecb
|
||||
0xcf 0x1ef9
|
||||
0xd0 0x01af
|
||||
0xd1 0x1ee6
|
||||
0xd2 0x1ed3
|
||||
0xd3 0x1ed1
|
||||
0xd4 0x00d4
|
||||
0xd5 0x1ecf
|
||||
0xd6 0x01a1
|
||||
0xd7 0x00c8
|
||||
0xd8 0x1eeb
|
||||
0xd9 0x1ee9
|
||||
0xda 0x00da
|
||||
0xdb 0x0169
|
||||
0xdc 0x01b0
|
||||
0xdd 0x00dd
|
||||
0xde 0x1eba
|
||||
0xdf 0x00df
|
||||
0xe0 0x00e0
|
||||
0xe1 0x00e1
|
||||
0xe2 0x00e2
|
||||
0xe3 0x00e3
|
||||
0xe4 0x1ea3
|
||||
0xe5 0x1ea1
|
||||
0xe6 0x0103
|
||||
0xe7 0x00e7
|
||||
0xe8 0x00e8
|
||||
0xe9 0x00e9
|
||||
0xea 0x00ea
|
||||
0xeb 0x1ebd
|
||||
0xec 0x00ec
|
||||
0xed 0x00ed
|
||||
0xee 0x00ee
|
||||
0xef 0x0129
|
||||
0xf0 0x1eb4
|
||||
0xf1 0x0110
|
||||
0xf2 0x00f2
|
||||
0xf3 0x00f3
|
||||
0xf4 0x00f4
|
||||
0xf5 0x00f5
|
||||
0xf6 0x00f6
|
||||
0xf7 0x01a0
|
||||
0xf8 0x1ee5
|
||||
0xf9 0x00f9
|
||||
0xfa 0x00fa
|
||||
0xfb 0x1ee7
|
||||
0xfc 0x00fc
|
||||
0xfd 0x1ef6
|
||||
0xfe 0x1ebc
|
||||
0xff 0x1ef3
|
||||
@ -1,96 +0,0 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build the unicode converter library
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH= ..\..\..
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DLLNAME=uni$(MOZ_BITS)00
|
||||
PDBFILE=$(DLLNAME).pdb
|
||||
MAPFILE=$(DLLNAME).map
|
||||
RESFILE=unitable.res
|
||||
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
DEFFILE=$(DLLNAME).def
|
||||
!endif
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define the files necessary to build the target (ie. OBJS)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
OBJS= \
|
||||
.\$(OBJDIR)\unitbl.obj \
|
||||
$(NULL)
|
||||
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
LIBRARY=.\$(OBJDIR)\$(DLLNAME).lib
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any local options for the make tools
|
||||
#// (ie. LCFLAGS, LLFLAGS, LLIBS, LINCS)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE)
|
||||
LLIBS=$(LLIBS) $(GLOWDIR)\glowcode.lib
|
||||
!endif
|
||||
LINCS=$(LINCS) -I_gen -I$(DEPTH)/include -I$(PUBLIC)\dbm -I$(PUBLIC)\img
|
||||
LCFLAGS = $(LCFLAGS) /Fr$*.sbr
|
||||
GARBAGE = $(GARBAGE) *.sbr
|
||||
!ifdef ALL_UNICODE_TABLE
|
||||
!if "$(MOZ_BITS)" == "32"
|
||||
RCFLAGS=$(RCFLAGS) /DALL_UNICODE_TABLE /DXP_WIN32
|
||||
!else
|
||||
RCFLAGS=$(RCFLAGS) /DALL_UNICODE_TABLE
|
||||
!endif
|
||||
!else
|
||||
!if "$(MOZ_BITS)" == "32"
|
||||
RCFLAGS=$(RCFLAGS) /DXP_WIN32
|
||||
!endif
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
||||
install:: $(DLL) $(LIBRARY)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
|
||||
INCLUDES = -I../..
|
||||
BIN_SUFFIX = .exe
|
||||
ifneq ($(subst /,_,$(shell uname -s)),OS2)
|
||||
.c.o:
|
||||
cc -c $(CFLAGS) $(INCLUDES) $*.c
|
||||
else
|
||||
.c.o:
|
||||
icc -c -Fo$*.o $(CFLAGS) $(INCLUDES) $*.c
|
||||
|
||||
endif
|
||||
|
||||
all: fromu$(BIN_SUFFIX) tou$(BIN_SUFFIX) fromu0208$(BIN_SUFFIX) \
|
||||
tou0208$(BIN_SUFFIX) xlatgen$(BIN_SUFFIX) xlatgenmac$(BIN_SUFFIX)
|
||||
|
||||
xlatgenmac$(BIN_SUFFIX): xlatgenmac.o xlatgenutil.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
xlatgen$(BIN_SUFFIX): xlatgen.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
fromu$(BIN_SUFFIX): fromu.o utblutil.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
tou$(BIN_SUFFIX): tou.o utblutil.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
fromu0208$(BIN_SUFFIX): fromu0208.o utblutil.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
tou0208$(BIN_SUFFIX): tou0208.o utblutil.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
utblutil.o$(BIN_SUFFIX): ../../umap.h
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
|
||||
INCLUDES = -I../..
|
||||
BIN_SUFFIX = .exe
|
||||
ifneq ($(subst /,_,$(shell uname -s)),OS2)
|
||||
.c.o:
|
||||
cc -c $(CFLAGS) $(INCLUDES) $*.c
|
||||
else
|
||||
.c.o:
|
||||
icc -c -Fo$*.o $(CFLAGS) $(INCLUDES) $*.c
|
||||
|
||||
endif
|
||||
|
||||
all: fromu$(BIN_SUFFIX) tou$(BIN_SUFFIX) fromu0208$(BIN_SUFFIX) \
|
||||
tou0208$(BIN_SUFFIX) xlatgen$(BIN_SUFFIX) xlatgenmac$(BIN_SUFFIX)
|
||||
|
||||
xlatgenmac$(BIN_SUFFIX): xlatgenmac.o xlatgenutil.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
xlatgen$(BIN_SUFFIX): xlatgen.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
fromu$(BIN_SUFFIX): fromu.o utblutil.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
tou$(BIN_SUFFIX): tou.o utblutil.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
fromu0208$(BIN_SUFFIX): fromu0208.o utblutil.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
tou0208$(BIN_SUFFIX): tou0208.o utblutil.o
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
utblutil.o$(BIN_SUFFIX): ../../umap.h
|
||||
ILINK -NOFREE -PMTYPE:VIO $?;
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
extern void SetMapValue(short u,short c);
|
||||
void getinput()
|
||||
{
|
||||
char buf[256];
|
||||
short c,u,idx;
|
||||
for(;gets(buf)!=NULL;)
|
||||
{
|
||||
if(buf[0]=='0' && buf[1] == 'x')
|
||||
{
|
||||
sscanf(buf,"%hx %hx",&c,&u);
|
||||
SetMapValue(u, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
extern void SetMapValue(short u,short c);
|
||||
void getinput()
|
||||
{
|
||||
char buf[256];
|
||||
short c,d,u,idx;
|
||||
for(;gets(buf)!=NULL;)
|
||||
{
|
||||
if(buf[0]=='0' && buf[1] == 'x')
|
||||
{
|
||||
sscanf(buf,"%hx %hx %hx",&d,&c,&u);
|
||||
SetMapValue(u, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
extern void SetMapValue(short u,short c);
|
||||
void getinput()
|
||||
{
|
||||
char buf[256];
|
||||
short c,u,idx;
|
||||
for(;gets(buf)!=NULL;)
|
||||
{
|
||||
if(buf[0]=='0' && buf[1] == 'x')
|
||||
{
|
||||
sscanf(buf,"%hx %hx",&c,&u);
|
||||
SetMapValue(c, u);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
extern void SetMapValue(short u,short c);
|
||||
void getinput()
|
||||
{
|
||||
char buf[256];
|
||||
short c,u,d,idx;
|
||||
for(;gets(buf)!=NULL;)
|
||||
{
|
||||
if(buf[0]=='0' && buf[1] == 'x')
|
||||
{
|
||||
sscanf(buf,"%hx %hx %hx",&d,&c,&u);
|
||||
SetMapValue(c, u);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,360 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
typedef short int16;
|
||||
typedef unsigned short uint16;
|
||||
#include "umap.h"
|
||||
uint16 umap[256][256];
|
||||
extern void getinput();
|
||||
|
||||
#define MAXCELLNUM 1000
|
||||
|
||||
static int numOfItem = 0;
|
||||
uMapCell cell[MAXCELLNUM];
|
||||
uint16 format[MAXCELLNUM / 4];
|
||||
uint16 mapping[256*256];
|
||||
static int mappinglen = 0;
|
||||
static int formatcount[4] = {0,0,0,0};
|
||||
|
||||
#define SetFormat(n,f) { format[(n >> 2)] |= ((f) << ((n & 0x0003) << 2)); formatcount[f]++; }
|
||||
#define GetFormat(n) ( format[(n >> 2)] >> ((n & 0x0003) << 2)) &0x00FF)
|
||||
#define MAPVALUE(i) (umap[(i >> 8) & 0xFF][(i) & 0xFF])
|
||||
|
||||
int FORMAT1CNST = 10 ;
|
||||
int FORMAT0CNST = 5 ;
|
||||
void initmaps()
|
||||
{
|
||||
int i,j;
|
||||
for(i=0;i<256;i++)
|
||||
for(j=0;j<256;j++)
|
||||
{
|
||||
umap[i][j]= NOMAPPING;
|
||||
}
|
||||
for(i=0;i<MAXCELLNUM / 4;i++)
|
||||
format[i]=0;
|
||||
}
|
||||
void SetMapValue(short u,short c)
|
||||
{
|
||||
MAPVALUE(u) = c & 0x0000FFFF;
|
||||
}
|
||||
void AddFormat2(uint16 srcBegin)
|
||||
{
|
||||
uint16 destBegin = MAPVALUE(srcBegin);
|
||||
printf("Begin of Item %04X\n",numOfItem);
|
||||
printf(" Format 2\n");
|
||||
printf(" srcBegin = %04X\n", srcBegin);
|
||||
printf(" destBegin = %04X\n", destBegin );
|
||||
SetFormat(numOfItem,2);
|
||||
cell[numOfItem].fmt.format2.srcBegin = srcBegin;
|
||||
cell[numOfItem].fmt.format2.srcEnd = 0;
|
||||
cell[numOfItem].fmt.format2.destBegin = destBegin;
|
||||
printf("End of Item %04X \n\n",numOfItem);
|
||||
numOfItem++;
|
||||
/* Unmark the umap */
|
||||
MAPVALUE(srcBegin) = NOMAPPING;
|
||||
}
|
||||
void AddFormat1(uint16 srcBegin, uint16 srcEnd)
|
||||
{
|
||||
uint16 i;
|
||||
printf("Begin of Item %04X\n",numOfItem);
|
||||
printf(" Format 1\n");
|
||||
printf(" srcBegin = %04X\n", srcBegin);
|
||||
printf(" srcEnd = %04X\n", srcEnd );
|
||||
printf(" mappingOffset = %04X\n", mappinglen);
|
||||
printf(" Mapping = " );
|
||||
SetFormat(numOfItem,1);
|
||||
cell[numOfItem].fmt.format1.srcBegin = srcBegin;
|
||||
cell[numOfItem].fmt.format1.srcEnd = srcEnd;
|
||||
cell[numOfItem].fmt.format1.mappingOffset = mappinglen;
|
||||
for(i=srcBegin ; i <= srcEnd ; i++,mappinglen++)
|
||||
{
|
||||
if( ((i-srcBegin) % 8) == 0)
|
||||
printf("\n ");
|
||||
mapping[mappinglen]= MAPVALUE(i);
|
||||
printf("%04X ",(mapping[mappinglen] ));
|
||||
/* Unmark the umap */
|
||||
MAPVALUE(i) = NOMAPPING;
|
||||
}
|
||||
printf("\n");
|
||||
printf("End of Item %04X \n\n",numOfItem);
|
||||
numOfItem++;
|
||||
}
|
||||
void AddFormat0(uint16 srcBegin, uint16 srcEnd)
|
||||
{
|
||||
uint16 i;
|
||||
uint16 destBegin = MAPVALUE(srcBegin);
|
||||
printf("Begin of Item %04X\n",numOfItem);
|
||||
printf(" Format 0\n");
|
||||
printf(" srcBegin = %04X\n", srcBegin);
|
||||
printf(" srcEnd = %04X\n", srcEnd );
|
||||
printf(" destBegin = %04X\n", destBegin );
|
||||
SetFormat(numOfItem,0);
|
||||
cell[numOfItem].fmt.format0.srcBegin = srcBegin;
|
||||
cell[numOfItem].fmt.format0.srcEnd = srcEnd;
|
||||
cell[numOfItem].fmt.format0.destBegin = destBegin;
|
||||
for(i=srcBegin ; i <= srcEnd ; i++)
|
||||
{
|
||||
/* Unmark the umap */
|
||||
MAPVALUE(i) = NOMAPPING;
|
||||
}
|
||||
printf("End of Item %04X \n\n",numOfItem);
|
||||
numOfItem++;
|
||||
}
|
||||
void gentable()
|
||||
{
|
||||
/* OK! For now, we just use format 1 for each row */
|
||||
/* We need to chage this to use other format to save the space */
|
||||
uint16 i,j,k;
|
||||
uint16 begin,end;
|
||||
uint16 ss,gs,gp,state,gc;
|
||||
uint16 diff, lastdiff;
|
||||
|
||||
printf("/*========================================================\n");
|
||||
printf(" This is a Generated file. Please don't edit it.\n");
|
||||
printf("\n");
|
||||
printf(" The tool which used to generate this file is called fromu.\n");
|
||||
printf(" If you have any problem of this file. Please contact \n");
|
||||
printf(" Netscape Client International Team or \n");
|
||||
printf(" ftang@netscape <Frank Tang> \n");
|
||||
printf("\n");
|
||||
printf(" Table in Debug form \n");
|
||||
|
||||
for(begin = 0; MAPVALUE(begin) ==NOMAPPING; begin++)
|
||||
;
|
||||
for(end = 0xFFFF; MAPVALUE(end) ==NOMAPPING; end--)
|
||||
;
|
||||
if(end != begin)
|
||||
{
|
||||
lastdiff = MAPVALUE(begin) - begin;
|
||||
for(gp=begin+1,state = 0 ; gp<=end; gp++)
|
||||
{
|
||||
int input ;
|
||||
diff = MAPVALUE(gp) - gp;
|
||||
input = (diff == lastdiff);
|
||||
switch(state)
|
||||
{
|
||||
case 0:
|
||||
if(input)
|
||||
{
|
||||
state = 1;
|
||||
ss = gp -1;
|
||||
gc = 2;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if(input)
|
||||
{
|
||||
if(gc++ >= FORMAT0CNST)
|
||||
{
|
||||
state = 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if(input)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
AddFormat0(ss,gp-1);
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
lastdiff = diff;
|
||||
}
|
||||
}
|
||||
if(state == 2)
|
||||
AddFormat0(ss,end);
|
||||
|
||||
for(;(MAPVALUE(begin) ==NOMAPPING) && (begin <= end); begin++)
|
||||
;
|
||||
if(begin <= end)
|
||||
{
|
||||
for(;(MAPVALUE(end)==NOMAPPING) && (end >= begin); end--)
|
||||
;
|
||||
for(ss=gp=begin,state = 0 ; gp<=end; gp++)
|
||||
{
|
||||
int input = (MAPVALUE(gp) == NOMAPPING);
|
||||
switch(state)
|
||||
{
|
||||
case 0:
|
||||
if(input)
|
||||
{
|
||||
gc = 1;
|
||||
gs = gp;
|
||||
state = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if(input)
|
||||
{
|
||||
if(gc++ >= FORMAT1CNST)
|
||||
state = 2;
|
||||
}
|
||||
else
|
||||
state = 0;
|
||||
break;
|
||||
case 2:
|
||||
if(input)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
if(gs == (ss+1))
|
||||
AddFormat2(ss);
|
||||
else
|
||||
AddFormat1(ss ,gs-1);
|
||||
state = 0;
|
||||
ss = gp;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(end == ss)
|
||||
AddFormat2(ss );
|
||||
else
|
||||
AddFormat1(ss ,end );
|
||||
}
|
||||
printf("========================================================*/\n");
|
||||
}
|
||||
void writetable()
|
||||
{
|
||||
uint16 i;
|
||||
uint16 off1,off2,off3;
|
||||
uint16 cur = 0;
|
||||
uint16 formatitem = (((numOfItem)>>2) + 1);
|
||||
off1 = 4;
|
||||
off2 = off1 + formatitem ;
|
||||
off3 = off2 + numOfItem * sizeof(uMapCell) / sizeof(uint16);
|
||||
/* write itemOfList */
|
||||
printf("/* Offset=0x%04X ItemOfList */\n 0x%04X,\n", cur++, numOfItem);
|
||||
|
||||
/* write offsetToFormatArray */
|
||||
printf("/*-------------------------------------------------------*/\n");
|
||||
printf("/* Offset=0x%04X offsetToFormatArray */\n 0x%04X,\n", cur++,off1);
|
||||
|
||||
/* write offsetToMapCellArray */
|
||||
printf("/*-------------------------------------------------------*/\n");
|
||||
printf("/* Offset=0x%04X offsetToMapCellArray */ \n 0x%04X,\n", cur++,off2);
|
||||
|
||||
/* write offsetToMappingTable */
|
||||
printf("/*-------------------------------------------------------*/\n");
|
||||
printf("/* Offset=0x%04X offsetToMappingTable */ \n 0x%04X,\n", cur++,off3);
|
||||
|
||||
/* write FormatArray */
|
||||
printf("/*-------------------------------------------------------*/\n");
|
||||
printf("/* Offset=0x%04X Start of Format Array */ \n",cur);
|
||||
printf("/* Total of Format 0 : 0x%04X */\n"
|
||||
, formatcount[0]);
|
||||
printf("/* Total of Format 1 : 0x%04X */\n"
|
||||
, formatcount[1]);
|
||||
printf("/* Total of Format 2 : 0x%04X */\n"
|
||||
, formatcount[2]);
|
||||
printf("/* Total of Format 3 : 0x%04X */\n"
|
||||
, formatcount[3]);
|
||||
for(i=0;i<formatitem;i++,cur++)
|
||||
{
|
||||
if((i%8) == 0)
|
||||
printf("\n");
|
||||
printf("0x%04X, ",format[i]);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
/* write MapCellArray */
|
||||
printf("/*-------------------------------------------------------*/\n");
|
||||
printf("/* Offset=0x%04X Start of MapCell Array */ \n",cur);
|
||||
for(i=0;i<numOfItem;i++,cur+=3)
|
||||
{
|
||||
printf("/* %04X */ 0x%04X, 0x%04X, 0x%04X, \n",
|
||||
i,
|
||||
cell[i].fmt.format0.srcBegin,
|
||||
cell[i].fmt.format0.srcEnd,
|
||||
cell[i].fmt.format0.destBegin
|
||||
);
|
||||
}
|
||||
|
||||
/* write MappingTable */
|
||||
printf("/*-------------------------------------------------------*/\n");
|
||||
printf("/* Offset=0x%04X Start of MappingTable */ \n",cur);
|
||||
for(i=0;i<mappinglen;i++,cur++)
|
||||
{
|
||||
if((i%8) == 0)
|
||||
printf("\n/* %04X */ ",i);
|
||||
printf("0x%04X, ",mapping[i] );
|
||||
}
|
||||
printf("\n");
|
||||
printf("/* End of table Total Length = 0x%04X * 2 */\n",cur);
|
||||
}
|
||||
|
||||
parsearg(int argc, char* argv[])
|
||||
{
|
||||
int i;
|
||||
for(i=0;i<argc;i++)
|
||||
{
|
||||
if((strncmp("-0", argv[i],2) == 0) && ((i+1) < argc))
|
||||
{
|
||||
int cnst0;
|
||||
if(sscanf(argv[i+1], "%d", &cnst0) == 1)
|
||||
{
|
||||
if(cnst0 > 0)
|
||||
{
|
||||
FORMAT0CNST = cnst0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "argc error !!!!\n");
|
||||
exit(-1);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if((strncmp("-1", argv[i],2) == 0) && ((i+1) < argc))
|
||||
{
|
||||
int cnst1;
|
||||
if(sscanf(argv[i+1], "%d", &cnst1) == 1)
|
||||
{
|
||||
if(cnst1 > 0)
|
||||
{
|
||||
FORMAT1CNST = cnst1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "argc error !!!!\n");
|
||||
exit(-1);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "format 0 cnst = %d\n", FORMAT0CNST);
|
||||
fprintf(stderr, "format 1 cnst = %d\n", FORMAT1CNST);
|
||||
}
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
parsearg(argc, argv);
|
||||
initmaps();
|
||||
getinput();
|
||||
gentable();
|
||||
writetable();
|
||||
}
|
||||
@ -1,190 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*
|
||||
single filename1 filename2
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
/*
|
||||
#define DEBUG 1
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
#define Trace(a) {fprintf(stderr,"Trace: %s\n",a); fflush(stderr); }
|
||||
#else
|
||||
#define Trace(a)
|
||||
#endif
|
||||
|
||||
static char *name1;
|
||||
static char *name2;
|
||||
|
||||
static unsigned short array1[256],array2[256];
|
||||
|
||||
void TraceNum(int a)
|
||||
{
|
||||
char buf[20];
|
||||
sprintf(buf, "[%X]",a);
|
||||
Trace(buf);
|
||||
}
|
||||
void usage()
|
||||
{
|
||||
fprintf(stderr,"Usage: xlatgen filename1 filename2 csid1 csid2\n");
|
||||
exit(-1);
|
||||
}
|
||||
void InitArray(unsigned short array[])
|
||||
{
|
||||
int i;
|
||||
for(i=0;i<32;i++)
|
||||
array[i]= i;
|
||||
for(i=32;i<256;i++)
|
||||
array[i]= 0xFFFD;
|
||||
array[0x7F]= 0x7F;
|
||||
array[0xFF]= 0xFF;
|
||||
}
|
||||
void TraceArray(char* name,unsigned short array[])
|
||||
{
|
||||
int i,j;
|
||||
char buf[128];
|
||||
Trace(name);
|
||||
for(i=0;i<256;i+=16)
|
||||
{
|
||||
sprintf(buf,"0x%2X: ",i);
|
||||
for(j=0;j<16;j++)
|
||||
{
|
||||
sprintf(buf,"%s %4X",buf, array[i+j]);
|
||||
}
|
||||
Trace(buf);
|
||||
}
|
||||
}
|
||||
void Quit(char* str)
|
||||
{
|
||||
Trace(str);
|
||||
exit(-1);
|
||||
}
|
||||
void ReadArray(char* name,unsigned short array[])
|
||||
{
|
||||
int i;
|
||||
char buf[80];
|
||||
FILE *fd;
|
||||
fd = fopen(name, "r");
|
||||
|
||||
if(fd == NULL)
|
||||
Quit("Cannot open file\n");
|
||||
Trace("File open ok");
|
||||
while(fgets(buf,80,fd))
|
||||
{
|
||||
if(buf[0] != '#')
|
||||
{
|
||||
int from;
|
||||
int to;
|
||||
sscanf(buf,"%x %x", &from, &to);
|
||||
array[(from & 0x00FF)] = (to & 0x0000FFFF);
|
||||
}
|
||||
}
|
||||
fclose(fd);
|
||||
}
|
||||
void ReportUnmap( unsigned short array1[], unsigned short array2[])
|
||||
{
|
||||
int i,j,found;
|
||||
int k;
|
||||
k=0;
|
||||
for(i=0;i<256;i++)
|
||||
{
|
||||
for(found=0,j=0;j<256;j++)
|
||||
{
|
||||
if(array1[i] == array2[j])
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(found == 0)
|
||||
{
|
||||
printf("/* %2X is unmap !!! */\n", i);
|
||||
k++;
|
||||
}
|
||||
}
|
||||
if(k!=0)
|
||||
{
|
||||
printf("/* There are total %d character unmap !! */\n",k);
|
||||
}
|
||||
}
|
||||
void GenMap(char* name1, char* name2, char* csid1, char* csid2,
|
||||
unsigned short array1[], unsigned short array2[])
|
||||
{
|
||||
int i,j,found;
|
||||
|
||||
printf("%s_TO_%s RCDATA\nBEGIN\n",csid1, csid2);
|
||||
printf("/* Translation %s -> %s */\n",name1, name2);
|
||||
ReportUnmap(array1,array2);
|
||||
for(i=0;i<256;i+=2)
|
||||
{
|
||||
if((i%16) == 0)
|
||||
printf("/*%Xx*/ ",i/16);
|
||||
printf("0x");
|
||||
|
||||
for(found=0,j=0;j<256;j++)
|
||||
{
|
||||
if(array1[i+1] == array2[j])
|
||||
{
|
||||
printf("%02X",j);
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(found == 0)
|
||||
printf("%2X",i+1);
|
||||
|
||||
for(found=0,j=0;j<256;j++)
|
||||
{
|
||||
if(array1[i] == array2[j])
|
||||
{
|
||||
printf("%02X",j);
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(found == 0)
|
||||
printf("%2X",i);
|
||||
|
||||
printf(", ");
|
||||
if((i%16) == 14)
|
||||
printf("\n");
|
||||
}
|
||||
printf("END /* End of %s_To_%s */\n\n", csid1, csid2);
|
||||
}
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
if(argc!=5)
|
||||
usage();
|
||||
|
||||
InitArray(array1);
|
||||
InitArray(array2);
|
||||
|
||||
Trace(argv[1]);
|
||||
ReadArray(argv[1],array1);
|
||||
TraceArray(argv[1],array1);
|
||||
|
||||
Trace(argv[2]);
|
||||
ReadArray(argv[2],array2);
|
||||
TraceArray(argv[2],array2);
|
||||
|
||||
GenMap(argv[1], argv[2], argv[3], argv[4],array1,array2 );
|
||||
printf("\n\n\n\n\n");
|
||||
GenMap(argv[2], argv[1], argv[4], argv[3], array2,array1 );
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*
|
||||
single filename1 filename2
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void GenMap(char* name1, char* name2,
|
||||
unsigned short array1[], unsigned short array2[])
|
||||
{
|
||||
int i,j,found;
|
||||
|
||||
printf("/* Translation %s -> %s */\n",name1, name2);
|
||||
ReportUnmap(array1,array2);
|
||||
printf("/* x0x1 x2x3 x4x5 x6x7 x8x9 xAxB xCxD xExF */\n");
|
||||
for(i=0;i<256;i++)
|
||||
{
|
||||
if((i%16) == 0)
|
||||
printf("/*%Xx*/ $\"",i/16);
|
||||
for(found=0,j=0;j<256;j++)
|
||||
{
|
||||
if(array1[i] == array2[j])
|
||||
{
|
||||
printf("%02X",j);
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(found == 0)
|
||||
{
|
||||
printf("%2X",i);
|
||||
}
|
||||
if((i%16) == 15)
|
||||
printf("\"\n");
|
||||
else if(i%2)
|
||||
printf(" ");
|
||||
}
|
||||
}
|
||||
@ -1,147 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*
|
||||
single filename1 filename2
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
/*
|
||||
#define DEBUG 1
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
#define Trace(a) {fprintf(stderr,"Trace: %s\n",a); fflush(stderr); }
|
||||
#else
|
||||
#define Trace(a)
|
||||
#endif
|
||||
|
||||
static char *name1;
|
||||
static char *name2;
|
||||
|
||||
static unsigned short array1[256],array2[256];
|
||||
|
||||
void TraceNum(int a)
|
||||
{
|
||||
char buf[20];
|
||||
sprintf(buf, "[%X]",a);
|
||||
Trace(buf);
|
||||
}
|
||||
void usage()
|
||||
{
|
||||
fprintf(stderr,"Usage: single filename1 filename2\n");
|
||||
exit(-1);
|
||||
}
|
||||
void InitArray(unsigned short array[])
|
||||
{
|
||||
int i;
|
||||
for(i=0;i<32;i++)
|
||||
array[i]= i;
|
||||
for(i=32;i<256;i++)
|
||||
array[i]= 0xFFFD;
|
||||
array[0x7F]= 0x7F;
|
||||
array[0xFF]= 0xFF;
|
||||
}
|
||||
void TraceArray(char* name,unsigned short array[])
|
||||
{
|
||||
int i,j;
|
||||
char buf[128];
|
||||
Trace(name);
|
||||
for(i=0;i<256;i+=16)
|
||||
{
|
||||
sprintf(buf,"0x%2X: ",i);
|
||||
for(j=0;j<16;j++)
|
||||
{
|
||||
sprintf(buf,"%s %4X",buf, array[i+j]);
|
||||
}
|
||||
Trace(buf);
|
||||
}
|
||||
}
|
||||
void Quit(char* str)
|
||||
{
|
||||
Trace(str);
|
||||
exit(-1);
|
||||
}
|
||||
void ReadArray(char* name,unsigned short array[])
|
||||
{
|
||||
int i;
|
||||
char buf[80];
|
||||
FILE *fd;
|
||||
fd = fopen(name, "r");
|
||||
|
||||
if(fd == NULL)
|
||||
Quit("Cannot open file\n");
|
||||
Trace("File open ok");
|
||||
while(fgets(buf,80,fd))
|
||||
{
|
||||
if(buf[0] != '#')
|
||||
{
|
||||
int from;
|
||||
int to;
|
||||
sscanf(buf,"%x %x", &from, &to);
|
||||
array[(from & 0x00FF)] = (to & 0x0000FFFF);
|
||||
}
|
||||
}
|
||||
fclose(fd);
|
||||
}
|
||||
void ReportUnmap( unsigned short array1[], unsigned short array2[])
|
||||
{
|
||||
int i,j,found;
|
||||
int k;
|
||||
k=0;
|
||||
for(i=0;i<256;i++)
|
||||
{
|
||||
for(found=0,j=0;j<256;j++)
|
||||
{
|
||||
if(array1[i] == array2[j])
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(found == 0)
|
||||
{
|
||||
printf("/* %2X is unmap !!! */\n", i);
|
||||
k++;
|
||||
}
|
||||
}
|
||||
if(k!=0)
|
||||
{
|
||||
printf("/* There are total %d character unmap !! */\n",k);
|
||||
}
|
||||
}
|
||||
extern void GenMap(char* name1, char* name2,
|
||||
unsigned short array1[], unsigned short array2[]);
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
if(argc!=3)
|
||||
usage();
|
||||
|
||||
InitArray(array1);
|
||||
InitArray(array2);
|
||||
|
||||
Trace(argv[1]);
|
||||
ReadArray(argv[1],array1);
|
||||
TraceArray(argv[1],array1);
|
||||
|
||||
Trace(argv[2]);
|
||||
ReadArray(argv[2],array2);
|
||||
TraceArray(argv[2],array2);
|
||||
|
||||
GenMap(argv[1], argv[2], array1,array2);
|
||||
GenMap(argv[2], argv[1], array2,array1);
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007E
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00FF
|
||||
destBegin = 00A0
|
||||
End of Item 0001
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0002,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0005,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x000B,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0002 */
|
||||
/* Total of Format 1 : 0x0000 */
|
||||
/* Total of Format 2 : 0x0000 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0005 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007E, 0x0000,
|
||||
/* 0001 */ 0x00A0, 0x00FF, 0x00A0,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x000B Start of MappingTable */
|
||||
|
||||
/* End of table Total Length = 0x000B * 2 */
|
||||
@ -1,145 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0020
|
||||
srcEnd = 007E
|
||||
destBegin = 0020
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 011B
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 FFFD FFFD FFFD 00A4 FFFD FFFD 00A7
|
||||
00A8 FFFD FFFD FFFD FFFD 00AD FFFD FFFD
|
||||
00B0 FFFD FFFD FFFD 00B4 FFFD FFFD FFFD
|
||||
00B8 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD 00C1 00C2 FFFD 00C4 FFFD FFFD 00C7
|
||||
FFFD 00C9 FFFD 00CB FFFD 00CD 00CE FFFD
|
||||
FFFD FFFD FFFD 00D3 00D4 FFFD 00D6 00D7
|
||||
FFFD FFFD 00DA FFFD 00DC 00DD FFFD 00DF
|
||||
FFFD 00E1 00E2 FFFD 00E4 FFFD FFFD 00E7
|
||||
FFFD 00E9 FFFD 00EB FFFD 00ED 00EE FFFD
|
||||
FFFD FFFD FFFD 00F3 00F4 FFFD 00F6 00F7
|
||||
FFFD FFFD 00FA FFFD 00FC 00FD FFFD FFFD
|
||||
FFFD FFFD 00C3 00E3 00A1 00B1 00C6 00E6
|
||||
FFFD FFFD FFFD FFFD 00C8 00E8 00CF 00EF
|
||||
00D0 00F0 FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
00CA 00EA 00CC 00EC
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 1
|
||||
srcBegin = 0139
|
||||
srcEnd = 017E
|
||||
mappingOffset = 007C
|
||||
Mapping =
|
||||
00C5 00E5 FFFD FFFD 00A5 00B5 FFFD FFFD
|
||||
00A3 00B3 00D1 00F1 FFFD FFFD 00D2 00F2
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD 00D5
|
||||
00F5 FFFD FFFD 00C0 00E0 FFFD FFFD 00D8
|
||||
00F8 00A6 00B6 FFFD FFFD 00AA 00BA 00A9
|
||||
00B9 00DE 00FE 00AB 00BB FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 00D9 00F9 00DB
|
||||
00FB FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
00AC 00BC 00AF 00BF 00AE 00BE
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 2
|
||||
srcBegin = 02C7
|
||||
destBegin = 00B7
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 1
|
||||
srcBegin = 02D8
|
||||
srcEnd = 02DD
|
||||
mappingOffset = 00C2
|
||||
Mapping =
|
||||
00A2 00FF FFFD 00B2 FFFD 00BD
|
||||
End of Item 0004
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0005,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0006,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0015,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0001 */
|
||||
/* Total of Format 1 : 0x0003 */
|
||||
/* Total of Format 2 : 0x0001 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x2110, 0x0001,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0006 Start of MapCell Array */
|
||||
/* 0000 */ 0x0020, 0x007E, 0x0020,
|
||||
/* 0001 */ 0x00A0, 0x011B, 0x0000,
|
||||
/* 0002 */ 0x0139, 0x017E, 0x007C,
|
||||
/* 0003 */ 0x02C7, 0x0000, 0x00B7,
|
||||
/* 0004 */ 0x02D8, 0x02DD, 0x00C2,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0015 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0xFFFD, 0x00A7,
|
||||
/* 0008 */ 0x00A8, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AD, 0xFFFD, 0xFFFD,
|
||||
/* 0010 */ 0x00B0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00B4, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0018 */ 0x00B8, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0020 */ 0xFFFD, 0x00C1, 0x00C2, 0xFFFD, 0x00C4, 0xFFFD, 0xFFFD, 0x00C7,
|
||||
/* 0028 */ 0xFFFD, 0x00C9, 0xFFFD, 0x00CB, 0xFFFD, 0x00CD, 0x00CE, 0xFFFD,
|
||||
/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00D3, 0x00D4, 0xFFFD, 0x00D6, 0x00D7,
|
||||
/* 0038 */ 0xFFFD, 0xFFFD, 0x00DA, 0xFFFD, 0x00DC, 0x00DD, 0xFFFD, 0x00DF,
|
||||
/* 0040 */ 0xFFFD, 0x00E1, 0x00E2, 0xFFFD, 0x00E4, 0xFFFD, 0xFFFD, 0x00E7,
|
||||
/* 0048 */ 0xFFFD, 0x00E9, 0xFFFD, 0x00EB, 0xFFFD, 0x00ED, 0x00EE, 0xFFFD,
|
||||
/* 0050 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00F3, 0x00F4, 0xFFFD, 0x00F6, 0x00F7,
|
||||
/* 0058 */ 0xFFFD, 0xFFFD, 0x00FA, 0xFFFD, 0x00FC, 0x00FD, 0xFFFD, 0xFFFD,
|
||||
/* 0060 */ 0xFFFD, 0xFFFD, 0x00C3, 0x00E3, 0x00A1, 0x00B1, 0x00C6, 0x00E6,
|
||||
/* 0068 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C8, 0x00E8, 0x00CF, 0x00EF,
|
||||
/* 0070 */ 0x00D0, 0x00F0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0078 */ 0x00CA, 0x00EA, 0x00CC, 0x00EC, 0x00C5, 0x00E5, 0xFFFD, 0xFFFD,
|
||||
/* 0080 */ 0x00A5, 0x00B5, 0xFFFD, 0xFFFD, 0x00A3, 0x00B3, 0x00D1, 0x00F1,
|
||||
/* 0088 */ 0xFFFD, 0xFFFD, 0x00D2, 0x00F2, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0090 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00D5, 0x00F5, 0xFFFD, 0xFFFD, 0x00C0,
|
||||
/* 0098 */ 0x00E0, 0xFFFD, 0xFFFD, 0x00D8, 0x00F8, 0x00A6, 0x00B6, 0xFFFD,
|
||||
/* 00A0 */ 0xFFFD, 0x00AA, 0x00BA, 0x00A9, 0x00B9, 0x00DE, 0x00FE, 0x00AB,
|
||||
/* 00A8 */ 0x00BB, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00B0 */ 0xFFFD, 0x00D9, 0x00F9, 0x00DB, 0x00FB, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00B8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AC, 0x00BC, 0x00AF, 0x00BF,
|
||||
/* 00C0 */ 0x00AE, 0x00BE, 0x00A2, 0x00FF, 0xFFFD, 0x00B2, 0xFFFD, 0x00BD,
|
||||
/* End of table Total Length = 0x00DD * 2 */
|
||||
@ -1,190 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0020
|
||||
srcEnd = 007E
|
||||
destBegin = 0020
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00C7
|
||||
srcEnd = 00CF
|
||||
destBegin = 00C7
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 00E7
|
||||
srcEnd = 00EF
|
||||
destBegin = 00E7
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00C4
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 FFFD FFFD 00A3 00A4 FFFD FFFD 00A7
|
||||
00A8 FFFD FFFD FFFD FFFD 00AD FFFD FFFD
|
||||
00B0 FFFD 00B2 00B3 00B4 00B5 FFFD 00B7
|
||||
00B8 FFFD FFFD FFFD FFFD 00BD FFFD FFFD
|
||||
00C0 00C1 00C2 FFFD 00C4
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 1
|
||||
srcBegin = 00D1
|
||||
srcEnd = 00E4
|
||||
mappingOffset = 0025
|
||||
Mapping =
|
||||
00D1 00D2 00D3 00D4 FFFD 00D6 00D7 FFFD
|
||||
00D9 00DA 00DB 00DC FFFD FFFD 00DF 00E0
|
||||
00E1 00E2 FFFD 00E4
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 00F1
|
||||
srcEnd = 00FC
|
||||
mappingOffset = 0039
|
||||
Mapping =
|
||||
00F1 00F2 00F3 00F4 FFFD 00F6 00F7 FFFD
|
||||
00F9 00FA 00FB 00FC
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 1
|
||||
srcBegin = 0108
|
||||
srcEnd = 010B
|
||||
mappingOffset = 0045
|
||||
Mapping =
|
||||
00C6 00E6 00C5 00E5
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 1
|
||||
srcBegin = 011C
|
||||
srcEnd = 0135
|
||||
mappingOffset = 0049
|
||||
Mapping =
|
||||
00D8 00F8 00AB 00BB 00D5 00F5 FFFD FFFD
|
||||
00A6 00B6 00A1 00B1 FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00A9 00B9 FFFD FFFD
|
||||
00AC 00BC
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 1
|
||||
srcBegin = 015C
|
||||
srcEnd = 015F
|
||||
mappingOffset = 0063
|
||||
Mapping =
|
||||
00DE 00FE 00AA 00BA
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 1
|
||||
srcBegin = 016C
|
||||
srcEnd = 016D
|
||||
mappingOffset = 0067
|
||||
Mapping =
|
||||
00DD 00FD
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 1
|
||||
srcBegin = 017B
|
||||
srcEnd = 017C
|
||||
mappingOffset = 0069
|
||||
Mapping =
|
||||
00AF 00BF
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 1
|
||||
srcBegin = 02D8
|
||||
srcEnd = 02D9
|
||||
mappingOffset = 006B
|
||||
Mapping =
|
||||
00A2 00FF
|
||||
End of Item 000B
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x000C,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0008,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x002C,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0003 */
|
||||
/* Total of Format 1 : 0x0009 */
|
||||
/* Total of Format 2 : 0x0000 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x1000, 0x1111, 0x1111, 0x0000,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0008 Start of MapCell Array */
|
||||
/* 0000 */ 0x0020, 0x007E, 0x0020,
|
||||
/* 0001 */ 0x00C7, 0x00CF, 0x00C7,
|
||||
/* 0002 */ 0x00E7, 0x00EF, 0x00E7,
|
||||
/* 0003 */ 0x00A0, 0x00C4, 0x0000,
|
||||
/* 0004 */ 0x00D1, 0x00E4, 0x0025,
|
||||
/* 0005 */ 0x00F1, 0x00FC, 0x0039,
|
||||
/* 0006 */ 0x0108, 0x010B, 0x0045,
|
||||
/* 0007 */ 0x011C, 0x0135, 0x0049,
|
||||
/* 0008 */ 0x015C, 0x015F, 0x0063,
|
||||
/* 0009 */ 0x016C, 0x016D, 0x0067,
|
||||
/* 000A */ 0x017B, 0x017C, 0x0069,
|
||||
/* 000B */ 0x02D8, 0x02D9, 0x006B,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x002C Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0x00A3, 0x00A4, 0xFFFD, 0xFFFD, 0x00A7,
|
||||
/* 0008 */ 0x00A8, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AD, 0xFFFD, 0xFFFD,
|
||||
/* 0010 */ 0x00B0, 0xFFFD, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0xFFFD, 0x00B7,
|
||||
/* 0018 */ 0x00B8, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00BD, 0xFFFD, 0xFFFD,
|
||||
/* 0020 */ 0x00C0, 0x00C1, 0x00C2, 0xFFFD, 0x00C4, 0x00D1, 0x00D2, 0x00D3,
|
||||
/* 0028 */ 0x00D4, 0xFFFD, 0x00D6, 0x00D7, 0xFFFD, 0x00D9, 0x00DA, 0x00DB,
|
||||
/* 0030 */ 0x00DC, 0xFFFD, 0xFFFD, 0x00DF, 0x00E0, 0x00E1, 0x00E2, 0xFFFD,
|
||||
/* 0038 */ 0x00E4, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0xFFFD, 0x00F6, 0x00F7,
|
||||
/* 0040 */ 0xFFFD, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00C6, 0x00E6, 0x00C5,
|
||||
/* 0048 */ 0x00E5, 0x00D8, 0x00F8, 0x00AB, 0x00BB, 0x00D5, 0x00F5, 0xFFFD,
|
||||
/* 0050 */ 0xFFFD, 0x00A6, 0x00B6, 0x00A1, 0x00B1, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0058 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A9, 0x00B9, 0xFFFD,
|
||||
/* 0060 */ 0xFFFD, 0x00AC, 0x00BC, 0x00DE, 0x00FE, 0x00AA, 0x00BA, 0x00DD,
|
||||
/* 0068 */ 0x00FD, 0x00AF, 0x00BF, 0x00A2, 0x00FF,
|
||||
/* End of table Total Length = 0x0099 * 2 */
|
||||
@ -1,165 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0020
|
||||
srcEnd = 007E
|
||||
destBegin = 0020
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00C1
|
||||
srcEnd = 00C6
|
||||
destBegin = 00C1
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 00E1
|
||||
srcEnd = 00E6
|
||||
destBegin = 00E1
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00B8
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 FFFD FFFD FFFD 00A4 FFFD FFFD 00A7
|
||||
00A8 FFFD FFFD FFFD FFFD 00AD FFFD 00AF
|
||||
00B0 FFFD FFFD FFFD 00B4 FFFD FFFD FFFD
|
||||
00B8
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 1
|
||||
srcBegin = 00C9
|
||||
srcEnd = 017E
|
||||
mappingOffset = 0019
|
||||
Mapping =
|
||||
00C9 FFFD 00CB FFFD 00CD 00CE FFFD FFFD
|
||||
FFFD FFFD FFFD 00D4 00D5 00D6 00D7 00D8
|
||||
FFFD 00DA 00DB 00DC FFFD FFFD 00DF FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
00E9 FFFD 00EB FFFD 00ED 00EE FFFD FFFD
|
||||
FFFD FFFD FFFD 00F4 00F5 00F6 00F7 00F8
|
||||
FFFD 00FA 00FB 00FC FFFD FFFD FFFD 00C0
|
||||
00E0 FFFD FFFD 00A1 00B1 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD 00C8 00E8 FFFD FFFD 00D0
|
||||
00F0 00AA 00BA FFFD FFFD 00CC 00EC 00CA
|
||||
00EA FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD 00AB 00BB FFFD FFFD FFFD FFFD 00A5
|
||||
00B5 00CF 00EF FFFD FFFD 00C7 00E7 FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 00D3 00F3 00A2
|
||||
FFFD FFFD 00A6 00B6 FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00D1 00F1 FFFD FFFD
|
||||
FFFD 00BD 00BF 00D2 00F2 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 00A3 00B3 FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD 00A9
|
||||
00B9 FFFD FFFD FFFD FFFD 00AC 00BC 00DD
|
||||
00FD 00DE 00FE FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD 00D9 00F9 FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00AE 00BE
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 02C7
|
||||
destBegin = 00B7
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 1
|
||||
srcBegin = 02D9
|
||||
srcEnd = 02DB
|
||||
mappingOffset = 00CF
|
||||
Mapping =
|
||||
00FF FFFD 00B2
|
||||
End of Item 0006
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0007,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0006,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x001B,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0003 */
|
||||
/* Total of Format 1 : 0x0003 */
|
||||
/* Total of Format 2 : 0x0001 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x1000, 0x0121,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0006 Start of MapCell Array */
|
||||
/* 0000 */ 0x0020, 0x007E, 0x0020,
|
||||
/* 0001 */ 0x00C1, 0x00C6, 0x00C1,
|
||||
/* 0002 */ 0x00E1, 0x00E6, 0x00E1,
|
||||
/* 0003 */ 0x00A0, 0x00B8, 0x0000,
|
||||
/* 0004 */ 0x00C9, 0x017E, 0x0019,
|
||||
/* 0005 */ 0x02C7, 0x0000, 0x00B7,
|
||||
/* 0006 */ 0x02D9, 0x02DB, 0x00CF,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x001B Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0xFFFD, 0x00A7,
|
||||
/* 0008 */ 0x00A8, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AD, 0xFFFD, 0x00AF,
|
||||
/* 0010 */ 0x00B0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00B4, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0018 */ 0x00B8, 0x00C9, 0xFFFD, 0x00CB, 0xFFFD, 0x00CD, 0x00CE, 0xFFFD,
|
||||
/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
|
||||
/* 0028 */ 0x00D8, 0xFFFD, 0x00DA, 0x00DB, 0x00DC, 0xFFFD, 0xFFFD, 0x00DF,
|
||||
/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0038 */ 0xFFFD, 0x00E9, 0xFFFD, 0x00EB, 0xFFFD, 0x00ED, 0x00EE, 0xFFFD,
|
||||
/* 0040 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
|
||||
/* 0048 */ 0x00F8, 0xFFFD, 0x00FA, 0x00FB, 0x00FC, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0050 */ 0x00C0, 0x00E0, 0xFFFD, 0xFFFD, 0x00A1, 0x00B1, 0xFFFD, 0xFFFD,
|
||||
/* 0058 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C8, 0x00E8, 0xFFFD, 0xFFFD,
|
||||
/* 0060 */ 0x00D0, 0x00F0, 0x00AA, 0x00BA, 0xFFFD, 0xFFFD, 0x00CC, 0x00EC,
|
||||
/* 0068 */ 0x00CA, 0x00EA, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0070 */ 0xFFFD, 0xFFFD, 0x00AB, 0x00BB, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0078 */ 0x00A5, 0x00B5, 0x00CF, 0x00EF, 0xFFFD, 0xFFFD, 0x00C7, 0x00E7,
|
||||
/* 0080 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D3, 0x00F3,
|
||||
/* 0088 */ 0x00A2, 0xFFFD, 0xFFFD, 0x00A6, 0x00B6, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0090 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D1, 0x00F1, 0xFFFD,
|
||||
/* 0098 */ 0xFFFD, 0xFFFD, 0x00BD, 0x00BF, 0x00D2, 0x00F2, 0xFFFD, 0xFFFD,
|
||||
/* 00A0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A3, 0x00B3,
|
||||
/* 00A8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00B0 */ 0x00A9, 0x00B9, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AC, 0x00BC,
|
||||
/* 00B8 */ 0x00DD, 0x00FD, 0x00DE, 0x00FE, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00C0 */ 0xFFFD, 0xFFFD, 0x00D9, 0x00F9, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00C8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AE, 0x00BE, 0x00FF,
|
||||
/* 00D0 */ 0xFFFD, 0x00B2,
|
||||
/* End of table Total Length = 0x00ED * 2 */
|
||||
@ -1,114 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0020
|
||||
srcEnd = 007E
|
||||
destBegin = 0020
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 0401
|
||||
srcEnd = 040C
|
||||
destBegin = 00A1
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 040E
|
||||
srcEnd = 044F
|
||||
destBegin = 00AE
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 0451
|
||||
srcEnd = 045C
|
||||
destBegin = 00F1
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00AD
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 FFFD FFFD FFFD FFFD FFFD FFFD 00FD
|
||||
FFFD FFFD FFFD FFFD FFFD 00AD
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 045E
|
||||
srcEnd = 045F
|
||||
mappingOffset = 000E
|
||||
Mapping =
|
||||
00FE 00FF
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 2116
|
||||
destBegin = 00F0
|
||||
End of Item 0006
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0007,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0006,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x001B,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0004 */
|
||||
/* Total of Format 1 : 0x0002 */
|
||||
/* Total of Format 2 : 0x0001 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x0211,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0006 Start of MapCell Array */
|
||||
/* 0000 */ 0x0020, 0x007E, 0x0020,
|
||||
/* 0001 */ 0x0401, 0x040C, 0x00A1,
|
||||
/* 0002 */ 0x040E, 0x044F, 0x00AE,
|
||||
/* 0003 */ 0x0451, 0x045C, 0x00F1,
|
||||
/* 0004 */ 0x00A0, 0x00AD, 0x0000,
|
||||
/* 0005 */ 0x045E, 0x045F, 0x000E,
|
||||
/* 0006 */ 0x2116, 0x0000, 0x00F0,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x001B Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00FD,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AD, 0x00FE, 0x00FF,
|
||||
/* End of table Total Length = 0x002B * 2 */
|
||||
@ -1,123 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0020
|
||||
srcEnd = 002F
|
||||
destBegin = 0020
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 003A
|
||||
srcEnd = 007E
|
||||
destBegin = 003A
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 0621
|
||||
srcEnd = 063A
|
||||
destBegin = 00C1
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 0640
|
||||
srcEnd = 0652
|
||||
destBegin = 00E0
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 0
|
||||
srcBegin = 0660
|
||||
srcEnd = 0669
|
||||
destBegin = 0030
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00AD
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 FFFD FFFD FFFD 00A4 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 00AD
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 060C
|
||||
destBegin = 00AC
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 1
|
||||
srcBegin = 061B
|
||||
srcEnd = 061F
|
||||
mappingOffset = 000E
|
||||
Mapping =
|
||||
00BB FFFD FFFD FFFD 00BF
|
||||
End of Item 0007
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0008,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0007,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x001F,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0005 */
|
||||
/* Total of Format 1 : 0x0002 */
|
||||
/* Total of Format 2 : 0x0001 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x1210, 0x0000,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0007 Start of MapCell Array */
|
||||
/* 0000 */ 0x0020, 0x002F, 0x0020,
|
||||
/* 0001 */ 0x003A, 0x007E, 0x003A,
|
||||
/* 0002 */ 0x0621, 0x063A, 0x00C1,
|
||||
/* 0003 */ 0x0640, 0x0652, 0x00E0,
|
||||
/* 0004 */ 0x0660, 0x0669, 0x0030,
|
||||
/* 0005 */ 0x00A0, 0x00AD, 0x0000,
|
||||
/* 0006 */ 0x060C, 0x0000, 0x00AC,
|
||||
/* 0007 */ 0x061B, 0x061F, 0x000E,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x001F Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AD, 0x00BB, 0xFFFD,
|
||||
/* 0010 */ 0xFFFD, 0xFFFD, 0x00BF,
|
||||
/* End of table Total Length = 0x0032 * 2 */
|
||||
@ -1,123 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0020
|
||||
srcEnd = 007E
|
||||
destBegin = 0020
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 038E
|
||||
srcEnd = 03A1
|
||||
destBegin = 00BE
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 03A3
|
||||
srcEnd = 03CE
|
||||
destBegin = 00D3
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00BD
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 FFFD FFFD 00A3 FFFD FFFD 00A6 00A7
|
||||
00A8 00A9 FFFD 00AB 00AC 00AD FFFD FFFD
|
||||
00B0 00B1 00B2 00B3 FFFD FFFD FFFD 00B7
|
||||
FFFD FFFD FFFD 00BB FFFD 00BD
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 1
|
||||
srcBegin = 02BC
|
||||
srcEnd = 02BD
|
||||
mappingOffset = 001E
|
||||
Mapping =
|
||||
00A2 00A1
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 0384
|
||||
srcEnd = 038C
|
||||
mappingOffset = 0020
|
||||
Mapping =
|
||||
00B4 00B5 00B6 FFFD 00B8 00B9 00BA FFFD
|
||||
00BC
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 2015
|
||||
destBegin = 00AF
|
||||
End of Item 0006
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0007,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0006,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x001B,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0003 */
|
||||
/* Total of Format 1 : 0x0003 */
|
||||
/* Total of Format 2 : 0x0001 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x1000, 0x0211,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0006 Start of MapCell Array */
|
||||
/* 0000 */ 0x0020, 0x007E, 0x0020,
|
||||
/* 0001 */ 0x038E, 0x03A1, 0x00BE,
|
||||
/* 0002 */ 0x03A3, 0x03CE, 0x00D3,
|
||||
/* 0003 */ 0x00A0, 0x00BD, 0x0000,
|
||||
/* 0004 */ 0x02BC, 0x02BD, 0x001E,
|
||||
/* 0005 */ 0x0384, 0x038C, 0x0020,
|
||||
/* 0006 */ 0x2015, 0x0000, 0x00AF,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x001B Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0x00A3, 0xFFFD, 0xFFFD, 0x00A6, 0x00A7,
|
||||
/* 0008 */ 0x00A8, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0xFFFD, 0xFFFD,
|
||||
/* 0010 */ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0xFFFD, 0xFFFD, 0xFFFD, 0x00B7,
|
||||
/* 0018 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00BB, 0xFFFD, 0x00BD, 0x00A2, 0x00A1,
|
||||
/* 0020 */ 0x00B4, 0x00B5, 0x00B6, 0xFFFD, 0x00B8, 0x00B9, 0x00BA, 0xFFFD,
|
||||
/* 0028 */ 0x00BC,
|
||||
/* End of table Total Length = 0x0044 * 2 */
|
||||
@ -1,136 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0020
|
||||
srcEnd = 007E
|
||||
destBegin = 0020
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00A2
|
||||
srcEnd = 00A9
|
||||
destBegin = 00A2
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 00B0
|
||||
srcEnd = 00B9
|
||||
destBegin = 00B0
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 05D0
|
||||
srcEnd = 05EA
|
||||
destBegin = 00E0
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00AE
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD 00AB 00AC 00AD 00AE
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 00BB
|
||||
srcEnd = 00BE
|
||||
mappingOffset = 000F
|
||||
Mapping =
|
||||
00BB 00BC 00BD 00BE
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 00D7
|
||||
destBegin = 00AA
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 00F7
|
||||
destBegin = 00BA
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 2
|
||||
srcBegin = 2017
|
||||
destBegin = 00DF
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 203E
|
||||
destBegin = 00AF
|
||||
End of Item 0009
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x000A,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0007,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0025,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0004 */
|
||||
/* Total of Format 1 : 0x0002 */
|
||||
/* Total of Format 2 : 0x0004 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x2211, 0x0022,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0007 Start of MapCell Array */
|
||||
/* 0000 */ 0x0020, 0x007E, 0x0020,
|
||||
/* 0001 */ 0x00A2, 0x00A9, 0x00A2,
|
||||
/* 0002 */ 0x00B0, 0x00B9, 0x00B0,
|
||||
/* 0003 */ 0x05D0, 0x05EA, 0x00E0,
|
||||
/* 0004 */ 0x00A0, 0x00AE, 0x0000,
|
||||
/* 0005 */ 0x00BB, 0x00BE, 0x000F,
|
||||
/* 0006 */ 0x00D7, 0x0000, 0x00AA,
|
||||
/* 0007 */ 0x00F7, 0x0000, 0x00BA,
|
||||
/* 0008 */ 0x2017, 0x0000, 0x00DF,
|
||||
/* 0009 */ 0x203E, 0x0000, 0x00AF,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0025 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00BB,
|
||||
/* 0010 */ 0x00BC, 0x00BD, 0x00BE,
|
||||
/* End of table Total Length = 0x0038 * 2 */
|
||||
@ -1,130 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0020
|
||||
srcEnd = 007E
|
||||
destBegin = 0020
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00CF
|
||||
destBegin = 00A0
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 00D1
|
||||
srcEnd = 00DC
|
||||
destBegin = 00D1
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 00DF
|
||||
srcEnd = 00EF
|
||||
destBegin = 00DF
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 0
|
||||
srcBegin = 00F1
|
||||
srcEnd = 00FC
|
||||
destBegin = 00F1
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 00FF
|
||||
destBegin = 00FF
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 1
|
||||
srcBegin = 011E
|
||||
srcEnd = 011F
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00D0 00F0
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 1
|
||||
srcBegin = 0130
|
||||
srcEnd = 0131
|
||||
mappingOffset = 0002
|
||||
Mapping =
|
||||
00DD 00FD
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 1
|
||||
srcBegin = 015E
|
||||
srcEnd = 015F
|
||||
mappingOffset = 0004
|
||||
Mapping =
|
||||
00DE 00FE
|
||||
End of Item 0008
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0009,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0007,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0022,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0005 */
|
||||
/* Total of Format 1 : 0x0003 */
|
||||
/* Total of Format 2 : 0x0001 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x1120, 0x0001,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0007 Start of MapCell Array */
|
||||
/* 0000 */ 0x0020, 0x007E, 0x0020,
|
||||
/* 0001 */ 0x00A0, 0x00CF, 0x00A0,
|
||||
/* 0002 */ 0x00D1, 0x00DC, 0x00D1,
|
||||
/* 0003 */ 0x00DF, 0x00EF, 0x00DF,
|
||||
/* 0004 */ 0x00F1, 0x00FC, 0x00F1,
|
||||
/* 0005 */ 0x00FF, 0x0000, 0x00FF,
|
||||
/* 0006 */ 0x011E, 0x011F, 0x0000,
|
||||
/* 0007 */ 0x0130, 0x0131, 0x0002,
|
||||
/* 0008 */ 0x015E, 0x015F, 0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0022 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00D0, 0x00F0, 0x00DD, 0x00FD, 0x00DE, 0x00FE,
|
||||
/* End of table Total Length = 0x0028 * 2 */
|
||||
@ -1,27 +0,0 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
|
||||
DEPTH = ../../../..
|
||||
|
||||
MODULE = i18n
|
||||
|
||||
EXPORTS = $(wildcard *.uf)
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = i18n
|
||||
|
||||
EXPORTS = $(wildcard $(srcdir)/*.uf)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
@ -1,209 +0,0 @@
|
||||
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 0027
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 002F
|
||||
srcEnd = 007F
|
||||
destBegin = 002F
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 1
|
||||
srcBegin = 0028
|
||||
srcEnd = 002E
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A5 00A4 002A 002B 002C 002D 00A9
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00AB
|
||||
mappingOffset = 0007
|
||||
Mapping =
|
||||
00A0 FFFD FFFD FFFD FFFD FFFD FFFD 00A2
|
||||
FFFD FFFD FFFD 00A7
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 2
|
||||
srcBegin = 00BB
|
||||
destBegin = 00A6
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 0152
|
||||
srcEnd = 0153
|
||||
mappingOffset = 0013
|
||||
Mapping =
|
||||
008C 009C
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 1
|
||||
srcBegin = 0160
|
||||
srcEnd = 0161
|
||||
mappingOffset = 0015
|
||||
Mapping =
|
||||
008A 009A
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 0178
|
||||
destBegin = 009F
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 2
|
||||
srcBegin = 0192
|
||||
destBegin = 0083
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 02C6
|
||||
destBegin = 0088
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 02DC
|
||||
destBegin = 0098
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 1
|
||||
srcBegin = 0531
|
||||
srcEnd = 0589
|
||||
mappingOffset = 0017
|
||||
Mapping =
|
||||
00B2 00B4 00B6 00B8 00BA 00BC 00BE 00C0
|
||||
00C2 00C4 00C6 00C8 00CA 00CC 00CE 00D0
|
||||
00D2 00D4 00D6 00D8 00DA 00DC 00DE 00E0
|
||||
00E2 00E4 00E6 00E8 00EA 00EC 00EE 00F0
|
||||
00F2 00F4 00F6 00F8 00FA 00FC FFFD FFFD
|
||||
FFFD 00FE 00B0 00AF 00AA 00B1 FFFD FFFD
|
||||
00B3 00B5 00B7 00B9 00BB 00BD 00BF 00C1
|
||||
00C3 00C5 00C7 00C9 00CB 00CD 00CF 00D1
|
||||
00D3 00D5 00D7 00D9 00DB 00DD 00DF 00E1
|
||||
00E3 00E5 00E7 00E9 00EB 00ED 00EF 00F1
|
||||
00F3 00F5 00F7 00F9 00FB 00FD 00AB FFFD
|
||||
00A3
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 1
|
||||
srcBegin = 2010
|
||||
srcEnd = 203A
|
||||
mappingOffset = 0070
|
||||
Mapping =
|
||||
00AD 00AC FFFD 0096 00A8 FFFD FFFD FFFD
|
||||
0091 0092 0082 FFFD 0093 0094 0084 FFFD
|
||||
0086 0087 0095 FFFD FFFD FFFD 00AE FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
0089 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD 008B 009B
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 2
|
||||
srcBegin = 2122
|
||||
destBegin = 0099
|
||||
End of Item 000D
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x000E,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0008,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0032,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0002 */
|
||||
/* Total of Format 1 : 0x0006 */
|
||||
/* Total of Format 2 : 0x0006 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x1100, 0x2112, 0x1222, 0x0021,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0008 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x0027, 0x0000,
|
||||
/* 0001 */ 0x002F, 0x007F, 0x002F,
|
||||
/* 0002 */ 0x0028, 0x002E, 0x0000,
|
||||
/* 0003 */ 0x00A0, 0x00AB, 0x0007,
|
||||
/* 0004 */ 0x00BB, 0x0000, 0x00A6,
|
||||
/* 0005 */ 0x0152, 0x0153, 0x0013,
|
||||
/* 0006 */ 0x0160, 0x0161, 0x0015,
|
||||
/* 0007 */ 0x0178, 0x0000, 0x009F,
|
||||
/* 0008 */ 0x0192, 0x0000, 0x0083,
|
||||
/* 0009 */ 0x02C6, 0x0000, 0x0088,
|
||||
/* 000A */ 0x02DC, 0x0000, 0x0098,
|
||||
/* 000B */ 0x0531, 0x0589, 0x0017,
|
||||
/* 000C */ 0x2010, 0x203A, 0x0070,
|
||||
/* 000D */ 0x2122, 0x0000, 0x0099,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0032 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A5, 0x00A4, 0x002A, 0x002B, 0x002C, 0x002D, 0x00A9, 0x00A0,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A2, 0xFFFD,
|
||||
/* 0010 */ 0xFFFD, 0xFFFD, 0x00A7, 0x008C, 0x009C, 0x008A, 0x009A, 0x00B2,
|
||||
/* 0018 */ 0x00B4, 0x00B6, 0x00B8, 0x00BA, 0x00BC, 0x00BE, 0x00C0, 0x00C2,
|
||||
/* 0020 */ 0x00C4, 0x00C6, 0x00C8, 0x00CA, 0x00CC, 0x00CE, 0x00D0, 0x00D2,
|
||||
/* 0028 */ 0x00D4, 0x00D6, 0x00D8, 0x00DA, 0x00DC, 0x00DE, 0x00E0, 0x00E2,
|
||||
/* 0030 */ 0x00E4, 0x00E6, 0x00E8, 0x00EA, 0x00EC, 0x00EE, 0x00F0, 0x00F2,
|
||||
/* 0038 */ 0x00F4, 0x00F6, 0x00F8, 0x00FA, 0x00FC, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0040 */ 0x00FE, 0x00B0, 0x00AF, 0x00AA, 0x00B1, 0xFFFD, 0xFFFD, 0x00B3,
|
||||
/* 0048 */ 0x00B5, 0x00B7, 0x00B9, 0x00BB, 0x00BD, 0x00BF, 0x00C1, 0x00C3,
|
||||
/* 0050 */ 0x00C5, 0x00C7, 0x00C9, 0x00CB, 0x00CD, 0x00CF, 0x00D1, 0x00D3,
|
||||
/* 0058 */ 0x00D5, 0x00D7, 0x00D9, 0x00DB, 0x00DD, 0x00DF, 0x00E1, 0x00E3,
|
||||
/* 0060 */ 0x00E5, 0x00E7, 0x00E9, 0x00EB, 0x00ED, 0x00EF, 0x00F1, 0x00F3,
|
||||
/* 0068 */ 0x00F5, 0x00F7, 0x00F9, 0x00FB, 0x00FD, 0x00AB, 0xFFFD, 0x00A3,
|
||||
/* 0070 */ 0x00AD, 0x00AC, 0xFFFD, 0x0096, 0x00A8, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0078 */ 0x0091, 0x0092, 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD,
|
||||
/* 0080 */ 0x0086, 0x0087, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AE, 0xFFFD,
|
||||
/* 0088 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0090 */ 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0098 */ 0xFFFD, 0x008B, 0x009B,
|
||||
/* End of table Total Length = 0x00CD * 2 */
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,204 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 001F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 0030
|
||||
srcEnd = 0039
|
||||
destBegin = 00F0
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 0041
|
||||
srcEnd = 0049
|
||||
destBegin = 00C1
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 004A
|
||||
srcEnd = 0052
|
||||
destBegin = 00D1
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 0
|
||||
srcBegin = 0053
|
||||
srcEnd = 005A
|
||||
destBegin = 00E2
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 0
|
||||
srcBegin = 0061
|
||||
srcEnd = 0069
|
||||
destBegin = 0081
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 0
|
||||
srcBegin = 006A
|
||||
srcEnd = 0072
|
||||
destBegin = 0091
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 0
|
||||
srcBegin = 0073
|
||||
srcEnd = 007A
|
||||
destBegin = 00A2
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 0
|
||||
srcBegin = F840
|
||||
srcEnd = F85F
|
||||
destBegin = 0020
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 1
|
||||
srcBegin = 0020
|
||||
srcEnd = 0040
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
0040 005A 007F 007B 005B 006C 0050 007D
|
||||
004D 005D 005C 004E 006B 0060 004B 0061
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 007A 005E 004C 007E 006E 006F
|
||||
007C
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 1
|
||||
srcBegin = 005B
|
||||
srcEnd = 0060
|
||||
mappingOffset = 0021
|
||||
Mapping =
|
||||
00BA 00E0 00BB 00B0 006D 0079
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 1
|
||||
srcBegin = 007B
|
||||
srcEnd = 007E
|
||||
mappingOffset = 0027
|
||||
Mapping =
|
||||
00C0 004F 00D0 00A1
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00FF
|
||||
mappingOffset = 002B
|
||||
Mapping =
|
||||
0041 00AA 004A 00B1 009F 00B2 006A 00B5
|
||||
00BD 00B4 009A 008A 005F 00CA 00AF 00BC
|
||||
0090 008F 00EA 00FA 00BE 00A0 00B6 00B3
|
||||
009D 00DA 009B 008B 00B7 00B8 00B9 00AB
|
||||
0064 0065 0062 0066 0063 0067 009E 0068
|
||||
0074 0071 0072 0073 0078 0075 0076 0077
|
||||
00AC 0069 00ED 00EE 00EB 00EF 00EC 00BF
|
||||
0080 00FD 00FE 00FB 00FC 00AD 00AE 0059
|
||||
0044 0045 0042 0046 0043 0047 009C 0048
|
||||
0054 0051 0052 0053 0058 0055 0056 0057
|
||||
008C 0049 00CD 00CE 00CB 00CF 00CC 00E1
|
||||
0070 00DD 00DE 00DB 00DC 008D 008E 00DF
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 2
|
||||
srcBegin = F860
|
||||
destBegin = 00FF
|
||||
End of Item 000D
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x000E,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0008,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0032,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0009 */
|
||||
/* Total of Format 1 : 0x0004 */
|
||||
/* Total of Format 2 : 0x0001 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x0000, 0x1110, 0x0021,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0008 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x001F, 0x0000,
|
||||
/* 0001 */ 0x0030, 0x0039, 0x00F0,
|
||||
/* 0002 */ 0x0041, 0x0049, 0x00C1,
|
||||
/* 0003 */ 0x004A, 0x0052, 0x00D1,
|
||||
/* 0004 */ 0x0053, 0x005A, 0x00E2,
|
||||
/* 0005 */ 0x0061, 0x0069, 0x0081,
|
||||
/* 0006 */ 0x006A, 0x0072, 0x0091,
|
||||
/* 0007 */ 0x0073, 0x007A, 0x00A2,
|
||||
/* 0008 */ 0xF840, 0xF85F, 0x0020,
|
||||
/* 0009 */ 0x0020, 0x0040, 0x0000,
|
||||
/* 000A */ 0x005B, 0x0060, 0x0021,
|
||||
/* 000B */ 0x007B, 0x007E, 0x0027,
|
||||
/* 000C */ 0x00A0, 0x00FF, 0x002B,
|
||||
/* 000D */ 0xF860, 0x0000, 0x00FF,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0032 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x0040, 0x005A, 0x007F, 0x007B, 0x005B, 0x006C, 0x0050, 0x007D,
|
||||
/* 0008 */ 0x004D, 0x005D, 0x005C, 0x004E, 0x006B, 0x0060, 0x004B, 0x0061,
|
||||
/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0018 */ 0xFFFD, 0xFFFD, 0x007A, 0x005E, 0x004C, 0x007E, 0x006E, 0x006F,
|
||||
/* 0020 */ 0x007C, 0x00BA, 0x00E0, 0x00BB, 0x00B0, 0x006D, 0x0079, 0x00C0,
|
||||
/* 0028 */ 0x004F, 0x00D0, 0x00A1, 0x0041, 0x00AA, 0x004A, 0x00B1, 0x009F,
|
||||
/* 0030 */ 0x00B2, 0x006A, 0x00B5, 0x00BD, 0x00B4, 0x009A, 0x008A, 0x005F,
|
||||
/* 0038 */ 0x00CA, 0x00AF, 0x00BC, 0x0090, 0x008F, 0x00EA, 0x00FA, 0x00BE,
|
||||
/* 0040 */ 0x00A0, 0x00B6, 0x00B3, 0x009D, 0x00DA, 0x009B, 0x008B, 0x00B7,
|
||||
/* 0048 */ 0x00B8, 0x00B9, 0x00AB, 0x0064, 0x0065, 0x0062, 0x0066, 0x0063,
|
||||
/* 0050 */ 0x0067, 0x009E, 0x0068, 0x0074, 0x0071, 0x0072, 0x0073, 0x0078,
|
||||
/* 0058 */ 0x0075, 0x0076, 0x0077, 0x00AC, 0x0069, 0x00ED, 0x00EE, 0x00EB,
|
||||
/* 0060 */ 0x00EF, 0x00EC, 0x00BF, 0x0080, 0x00FD, 0x00FE, 0x00FB, 0x00FC,
|
||||
/* 0068 */ 0x00AD, 0x00AE, 0x0059, 0x0044, 0x0045, 0x0042, 0x0046, 0x0043,
|
||||
/* 0070 */ 0x0047, 0x009C, 0x0048, 0x0054, 0x0051, 0x0052, 0x0053, 0x0058,
|
||||
/* 0078 */ 0x0055, 0x0056, 0x0057, 0x008C, 0x0049, 0x00CD, 0x00CE, 0x00CB,
|
||||
/* 0080 */ 0x00CF, 0x00CC, 0x00E1, 0x0070, 0x00DD, 0x00DE, 0x00DB, 0x00DC,
|
||||
/* 0088 */ 0x008D, 0x008E, 0x00DF,
|
||||
/* End of table Total Length = 0x00BD * 2 */
|
||||
@ -1,235 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 001F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 0030
|
||||
srcEnd = 0039
|
||||
destBegin = 00F0
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 0041
|
||||
srcEnd = 0049
|
||||
destBegin = 00C1
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 004A
|
||||
srcEnd = 0052
|
||||
destBegin = 00D1
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 0
|
||||
srcBegin = 0053
|
||||
srcEnd = 005A
|
||||
destBegin = 00E2
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 0
|
||||
srcBegin = 0061
|
||||
srcEnd = 0069
|
||||
destBegin = 0081
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 0
|
||||
srcBegin = 006A
|
||||
srcEnd = 0072
|
||||
destBegin = 0091
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 0
|
||||
srcBegin = 0073
|
||||
srcEnd = 007A
|
||||
destBegin = 00A2
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 0
|
||||
srcBegin = F866
|
||||
srcEnd = F885
|
||||
destBegin = 0020
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 1
|
||||
srcBegin = 0020
|
||||
srcEnd = 0040
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
0040 004F 00FC 00EC 00AD 006C 0050 007D
|
||||
004D 005D 005C 004E 006B 0060 004B 0061
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 007A 005E 004C 007E 006E 006F
|
||||
00AE
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 1
|
||||
srcBegin = 005B
|
||||
srcEnd = 0060
|
||||
mappingOffset = 0021
|
||||
Mapping =
|
||||
0068 00DC 00AC 005F 006D 008D
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 1
|
||||
srcBegin = 007B
|
||||
srcEnd = 007E
|
||||
mappingOffset = 0027
|
||||
Mapping =
|
||||
0048 00BB 008C 00CC
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00FF
|
||||
mappingOffset = 002B
|
||||
Mapping =
|
||||
0041 00AA 00B0 00B1 009F 00B2 008E 00B5
|
||||
00BD 00B4 009A 008A 00BA 00CA 00AF 00BC
|
||||
0090 008F 00EA 00FA 00BE 00A0 00B6 00B3
|
||||
009D 00DA 009B 008B 00B7 00B8 00B9 00AB
|
||||
0064 0065 0062 0066 0063 0067 009E 004A
|
||||
0074 0071 0072 0073 0078 0075 0076 0077
|
||||
FFFD 0069 00ED 00EE 00EB 00EF 007B 00BF
|
||||
0080 00FD 00FE 00FB 007F FFFD FFFD 0059
|
||||
0044 0045 0042 0046 0043 0047 009C 00C0
|
||||
0054 0051 0052 0053 0058 0055 0056 0057
|
||||
FFFD 0049 00CD 00CE 00CB 00CF 00A1 00E1
|
||||
0070 00DD 00DE 00DB 00E0 FFFD FFFD 00DF
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 1
|
||||
srcBegin = 011E
|
||||
srcEnd = 011F
|
||||
mappingOffset = 008B
|
||||
Mapping =
|
||||
005A 00D0
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 1
|
||||
srcBegin = 0130
|
||||
srcEnd = 0131
|
||||
mappingOffset = 008D
|
||||
Mapping =
|
||||
005B 0079
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 1
|
||||
srcBegin = 015E
|
||||
srcEnd = 015F
|
||||
mappingOffset = 008F
|
||||
Mapping =
|
||||
007C 006A
|
||||
End of Item 000F
|
||||
|
||||
Begin of Item 0010
|
||||
Format 2
|
||||
srcBegin = F886
|
||||
destBegin = 00FF
|
||||
End of Item 0010
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0011,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0009,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x003C,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0009 */
|
||||
/* Total of Format 1 : 0x0007 */
|
||||
/* Total of Format 2 : 0x0001 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x0000, 0x1110, 0x1111, 0x0002,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0009 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x001F, 0x0000,
|
||||
/* 0001 */ 0x0030, 0x0039, 0x00F0,
|
||||
/* 0002 */ 0x0041, 0x0049, 0x00C1,
|
||||
/* 0003 */ 0x004A, 0x0052, 0x00D1,
|
||||
/* 0004 */ 0x0053, 0x005A, 0x00E2,
|
||||
/* 0005 */ 0x0061, 0x0069, 0x0081,
|
||||
/* 0006 */ 0x006A, 0x0072, 0x0091,
|
||||
/* 0007 */ 0x0073, 0x007A, 0x00A2,
|
||||
/* 0008 */ 0xF866, 0xF885, 0x0020,
|
||||
/* 0009 */ 0x0020, 0x0040, 0x0000,
|
||||
/* 000A */ 0x005B, 0x0060, 0x0021,
|
||||
/* 000B */ 0x007B, 0x007E, 0x0027,
|
||||
/* 000C */ 0x00A0, 0x00FF, 0x002B,
|
||||
/* 000D */ 0x011E, 0x011F, 0x008B,
|
||||
/* 000E */ 0x0130, 0x0131, 0x008D,
|
||||
/* 000F */ 0x015E, 0x015F, 0x008F,
|
||||
/* 0010 */ 0xF886, 0x0000, 0x00FF,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x003C Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x0040, 0x004F, 0x00FC, 0x00EC, 0x00AD, 0x006C, 0x0050, 0x007D,
|
||||
/* 0008 */ 0x004D, 0x005D, 0x005C, 0x004E, 0x006B, 0x0060, 0x004B, 0x0061,
|
||||
/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0018 */ 0xFFFD, 0xFFFD, 0x007A, 0x005E, 0x004C, 0x007E, 0x006E, 0x006F,
|
||||
/* 0020 */ 0x00AE, 0x0068, 0x00DC, 0x00AC, 0x005F, 0x006D, 0x008D, 0x0048,
|
||||
/* 0028 */ 0x00BB, 0x008C, 0x00CC, 0x0041, 0x00AA, 0x00B0, 0x00B1, 0x009F,
|
||||
/* 0030 */ 0x00B2, 0x008E, 0x00B5, 0x00BD, 0x00B4, 0x009A, 0x008A, 0x00BA,
|
||||
/* 0038 */ 0x00CA, 0x00AF, 0x00BC, 0x0090, 0x008F, 0x00EA, 0x00FA, 0x00BE,
|
||||
/* 0040 */ 0x00A0, 0x00B6, 0x00B3, 0x009D, 0x00DA, 0x009B, 0x008B, 0x00B7,
|
||||
/* 0048 */ 0x00B8, 0x00B9, 0x00AB, 0x0064, 0x0065, 0x0062, 0x0066, 0x0063,
|
||||
/* 0050 */ 0x0067, 0x009E, 0x004A, 0x0074, 0x0071, 0x0072, 0x0073, 0x0078,
|
||||
/* 0058 */ 0x0075, 0x0076, 0x0077, 0xFFFD, 0x0069, 0x00ED, 0x00EE, 0x00EB,
|
||||
/* 0060 */ 0x00EF, 0x007B, 0x00BF, 0x0080, 0x00FD, 0x00FE, 0x00FB, 0x007F,
|
||||
/* 0068 */ 0xFFFD, 0xFFFD, 0x0059, 0x0044, 0x0045, 0x0042, 0x0046, 0x0043,
|
||||
/* 0070 */ 0x0047, 0x009C, 0x00C0, 0x0054, 0x0051, 0x0052, 0x0053, 0x0058,
|
||||
/* 0078 */ 0x0055, 0x0056, 0x0057, 0xFFFD, 0x0049, 0x00CD, 0x00CE, 0x00CB,
|
||||
/* 0080 */ 0x00CF, 0x00A1, 0x00E1, 0x0070, 0x00DD, 0x00DE, 0x00DB, 0x00E0,
|
||||
/* 0088 */ 0xFFFD, 0xFFFD, 0x00DF, 0x005A, 0x00D0, 0x005B, 0x0079, 0x007C,
|
||||
/* 0090 */ 0x006A,
|
||||
/* End of table Total Length = 0x00CD * 2 */
|
||||
@ -1,178 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 011B
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 FFFD FFFD FFFD 00A4 FFFD 00A6 00A7
|
||||
00A8 00A9 FFFD 00AB 00AC 00AD 00AE FFFD
|
||||
00B0 00B1 FFFD FFFD 00B4 00B5 00B6 00B7
|
||||
00B8 FFFD FFFD 00BB FFFD FFFD FFFD FFFD
|
||||
FFFD 00C1 00C2 FFFD 00C4 FFFD FFFD 00C7
|
||||
FFFD 00C9 FFFD 00CB FFFD 00CD 00CE FFFD
|
||||
FFFD FFFD FFFD 00D3 00D4 FFFD 00D6 00D7
|
||||
FFFD FFFD 00DA FFFD 00DC 00DD FFFD 00DF
|
||||
FFFD 00E1 00E2 FFFD 00E4 FFFD FFFD 00E7
|
||||
FFFD 00E9 FFFD 00EB FFFD 00ED 00EE FFFD
|
||||
FFFD FFFD FFFD 00F3 00F4 FFFD 00F6 00F7
|
||||
FFFD FFFD 00FA FFFD 00FC 00FD FFFD FFFD
|
||||
FFFD FFFD 00C3 00E3 00A5 00B9 00C6 00E6
|
||||
FFFD FFFD FFFD FFFD 00C8 00E8 00CF 00EF
|
||||
00D0 00F0 FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
00CA 00EA 00CC 00EC
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 1
|
||||
srcBegin = 0139
|
||||
srcEnd = 017E
|
||||
mappingOffset = 007C
|
||||
Mapping =
|
||||
00C5 00E5 FFFD FFFD 00BC 00BE FFFD FFFD
|
||||
00A3 00B3 00D1 00F1 FFFD FFFD 00D2 00F2
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD 00D5
|
||||
00F5 FFFD FFFD 00C0 00E0 FFFD FFFD 00D8
|
||||
00F8 008C 009C FFFD FFFD 00AA 00BA 008A
|
||||
009A 00DE 00FE 008D 009D FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 00D9 00F9 00DB
|
||||
00FB FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
008F 009F 00AF 00BF 008E 009E
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 2
|
||||
srcBegin = 02C7
|
||||
destBegin = 00A1
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 1
|
||||
srcBegin = 02D8
|
||||
srcEnd = 02DD
|
||||
mappingOffset = 00C2
|
||||
Mapping =
|
||||
00A2 00FF FFFD 00B2 FFFD 00BD
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 2013
|
||||
srcEnd = 203A
|
||||
mappingOffset = 00C8
|
||||
Mapping =
|
||||
0096 0097 FFFD FFFD FFFD 0091 0092 0082
|
||||
FFFD 0093 0094 0084 FFFD 0086 0087 0095
|
||||
FFFD FFFD FFFD 0085 FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 0089 FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 008B 009B
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 20AC
|
||||
destBegin = 0080
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 2122
|
||||
destBegin = 0099
|
||||
End of Item 0007
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0008,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0007,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x001F,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0001 */
|
||||
/* Total of Format 1 : 0x0004 */
|
||||
/* Total of Format 2 : 0x0003 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x2110, 0x2211, 0x0000,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0007 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007F, 0x0000,
|
||||
/* 0001 */ 0x00A0, 0x011B, 0x0000,
|
||||
/* 0002 */ 0x0139, 0x017E, 0x007C,
|
||||
/* 0003 */ 0x02C7, 0x0000, 0x00A1,
|
||||
/* 0004 */ 0x02D8, 0x02DD, 0x00C2,
|
||||
/* 0005 */ 0x2013, 0x203A, 0x00C8,
|
||||
/* 0006 */ 0x20AC, 0x0000, 0x0080,
|
||||
/* 0007 */ 0x2122, 0x0000, 0x0099,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x001F Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0x00A6, 0x00A7,
|
||||
/* 0008 */ 0x00A8, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0xFFFD,
|
||||
/* 0010 */ 0x00B0, 0x00B1, 0xFFFD, 0xFFFD, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
/* 0018 */ 0x00B8, 0xFFFD, 0xFFFD, 0x00BB, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0020 */ 0xFFFD, 0x00C1, 0x00C2, 0xFFFD, 0x00C4, 0xFFFD, 0xFFFD, 0x00C7,
|
||||
/* 0028 */ 0xFFFD, 0x00C9, 0xFFFD, 0x00CB, 0xFFFD, 0x00CD, 0x00CE, 0xFFFD,
|
||||
/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00D3, 0x00D4, 0xFFFD, 0x00D6, 0x00D7,
|
||||
/* 0038 */ 0xFFFD, 0xFFFD, 0x00DA, 0xFFFD, 0x00DC, 0x00DD, 0xFFFD, 0x00DF,
|
||||
/* 0040 */ 0xFFFD, 0x00E1, 0x00E2, 0xFFFD, 0x00E4, 0xFFFD, 0xFFFD, 0x00E7,
|
||||
/* 0048 */ 0xFFFD, 0x00E9, 0xFFFD, 0x00EB, 0xFFFD, 0x00ED, 0x00EE, 0xFFFD,
|
||||
/* 0050 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00F3, 0x00F4, 0xFFFD, 0x00F6, 0x00F7,
|
||||
/* 0058 */ 0xFFFD, 0xFFFD, 0x00FA, 0xFFFD, 0x00FC, 0x00FD, 0xFFFD, 0xFFFD,
|
||||
/* 0060 */ 0xFFFD, 0xFFFD, 0x00C3, 0x00E3, 0x00A5, 0x00B9, 0x00C6, 0x00E6,
|
||||
/* 0068 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C8, 0x00E8, 0x00CF, 0x00EF,
|
||||
/* 0070 */ 0x00D0, 0x00F0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0078 */ 0x00CA, 0x00EA, 0x00CC, 0x00EC, 0x00C5, 0x00E5, 0xFFFD, 0xFFFD,
|
||||
/* 0080 */ 0x00BC, 0x00BE, 0xFFFD, 0xFFFD, 0x00A3, 0x00B3, 0x00D1, 0x00F1,
|
||||
/* 0088 */ 0xFFFD, 0xFFFD, 0x00D2, 0x00F2, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0090 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00D5, 0x00F5, 0xFFFD, 0xFFFD, 0x00C0,
|
||||
/* 0098 */ 0x00E0, 0xFFFD, 0xFFFD, 0x00D8, 0x00F8, 0x008C, 0x009C, 0xFFFD,
|
||||
/* 00A0 */ 0xFFFD, 0x00AA, 0x00BA, 0x008A, 0x009A, 0x00DE, 0x00FE, 0x008D,
|
||||
/* 00A8 */ 0x009D, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00B0 */ 0xFFFD, 0x00D9, 0x00F9, 0x00DB, 0x00FB, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00B8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008F, 0x009F, 0x00AF, 0x00BF,
|
||||
/* 00C0 */ 0x008E, 0x009E, 0x00A2, 0x00FF, 0xFFFD, 0x00B2, 0xFFFD, 0x00BD,
|
||||
/* 00C8 */ 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0x0082,
|
||||
/* 00D0 */ 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, 0x0095,
|
||||
/* 00D8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00E0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, 0xFFFD,
|
||||
/* 00E8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, 0x009B,
|
||||
/* End of table Total Length = 0x010F * 2 */
|
||||
@ -1,161 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 0410
|
||||
srcEnd = 044F
|
||||
destBegin = 00C0
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00BB
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 FFFD FFFD FFFD 00A4 FFFD 00A6 00A7
|
||||
FFFD 00A9 FFFD 00AB 00AC 00AD 00AE FFFD
|
||||
00B0 00B1 FFFD FFFD FFFD 00B5 00B6 00B7
|
||||
FFFD FFFD FFFD 00BB
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 1
|
||||
srcBegin = 0401
|
||||
srcEnd = 040F
|
||||
mappingOffset = 001C
|
||||
Mapping =
|
||||
00A8 0080 0081 00AA 00BD 00B2 00AF 00A3
|
||||
008A 008C 008E 008D FFFD 00A1 008F
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 1
|
||||
srcBegin = 0451
|
||||
srcEnd = 045F
|
||||
mappingOffset = 002B
|
||||
Mapping =
|
||||
00B8 0090 0083 00BA 00BE 00B3 00BF 00BC
|
||||
009A 009C 009E 009D FFFD 00A2 009F
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 0490
|
||||
srcEnd = 0491
|
||||
mappingOffset = 003A
|
||||
Mapping =
|
||||
00A5 00B4
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 1
|
||||
srcBegin = 2013
|
||||
srcEnd = 203A
|
||||
mappingOffset = 003C
|
||||
Mapping =
|
||||
0096 0097 FFFD FFFD FFFD 0091 0092 0082
|
||||
FFFD 0093 0094 0084 FFFD 0086 0087 0095
|
||||
FFFD FFFD FFFD 0085 FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 0089 FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 008B 009B
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 20AC
|
||||
destBegin = 0088
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 2
|
||||
srcBegin = 2116
|
||||
destBegin = 00B9
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 2122
|
||||
destBegin = 0099
|
||||
End of Item 0009
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x000A,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0007,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0025,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0002 */
|
||||
/* Total of Format 1 : 0x0005 */
|
||||
/* Total of Format 2 : 0x0003 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x1100, 0x2111, 0x0022,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0007 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007F, 0x0000,
|
||||
/* 0001 */ 0x0410, 0x044F, 0x00C0,
|
||||
/* 0002 */ 0x00A0, 0x00BB, 0x0000,
|
||||
/* 0003 */ 0x0401, 0x040F, 0x001C,
|
||||
/* 0004 */ 0x0451, 0x045F, 0x002B,
|
||||
/* 0005 */ 0x0490, 0x0491, 0x003A,
|
||||
/* 0006 */ 0x2013, 0x203A, 0x003C,
|
||||
/* 0007 */ 0x20AC, 0x0000, 0x0088,
|
||||
/* 0008 */ 0x2116, 0x0000, 0x00B9,
|
||||
/* 0009 */ 0x2122, 0x0000, 0x0099,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0025 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0x00A6, 0x00A7,
|
||||
/* 0008 */ 0xFFFD, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0xFFFD,
|
||||
/* 0010 */ 0x00B0, 0x00B1, 0xFFFD, 0xFFFD, 0xFFFD, 0x00B5, 0x00B6, 0x00B7,
|
||||
/* 0018 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00BB, 0x00A8, 0x0080, 0x0081, 0x00AA,
|
||||
/* 0020 */ 0x00BD, 0x00B2, 0x00AF, 0x00A3, 0x008A, 0x008C, 0x008E, 0x008D,
|
||||
/* 0028 */ 0xFFFD, 0x00A1, 0x008F, 0x00B8, 0x0090, 0x0083, 0x00BA, 0x00BE,
|
||||
/* 0030 */ 0x00B3, 0x00BF, 0x00BC, 0x009A, 0x009C, 0x009E, 0x009D, 0xFFFD,
|
||||
/* 0038 */ 0x00A2, 0x009F, 0x00A5, 0x00B4, 0x0096, 0x0097, 0xFFFD, 0xFFFD,
|
||||
/* 0040 */ 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084,
|
||||
/* 0048 */ 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085,
|
||||
/* 0050 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0058 */ 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0060 */ 0xFFFD, 0xFFFD, 0x008B, 0x009B,
|
||||
/* End of table Total Length = 0x0089 * 2 */
|
||||
@ -1,154 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00FF
|
||||
destBegin = 00A0
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 1
|
||||
srcBegin = 0152
|
||||
srcEnd = 0153
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
008C 009C
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 1
|
||||
srcBegin = 0160
|
||||
srcEnd = 0161
|
||||
mappingOffset = 0002
|
||||
Mapping =
|
||||
008A 009A
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 1
|
||||
srcBegin = 0178
|
||||
srcEnd = 017E
|
||||
mappingOffset = 0004
|
||||
Mapping =
|
||||
009F FFFD FFFD FFFD FFFD 008E 009E
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 0192
|
||||
destBegin = 0083
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 02C6
|
||||
destBegin = 0088
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 02DC
|
||||
destBegin = 0098
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 1
|
||||
srcBegin = 2013
|
||||
srcEnd = 203A
|
||||
mappingOffset = 000B
|
||||
Mapping =
|
||||
0096 0097 FFFD FFFD FFFD 0091 0092 0082
|
||||
FFFD 0093 0094 0084 FFFD 0086 0087 0095
|
||||
FFFD FFFD FFFD 0085 FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 0089 FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 008B 009B
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 20AC
|
||||
destBegin = 0080
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 2122
|
||||
destBegin = 0099
|
||||
End of Item 000A
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x000B,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0007,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0028,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0002 */
|
||||
/* Total of Format 1 : 0x0004 */
|
||||
/* Total of Format 2 : 0x0005 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x1100, 0x2221, 0x0221,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0007 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007F, 0x0000,
|
||||
/* 0001 */ 0x00A0, 0x00FF, 0x00A0,
|
||||
/* 0002 */ 0x0152, 0x0153, 0x0000,
|
||||
/* 0003 */ 0x0160, 0x0161, 0x0002,
|
||||
/* 0004 */ 0x0178, 0x017E, 0x0004,
|
||||
/* 0005 */ 0x0192, 0x0000, 0x0083,
|
||||
/* 0006 */ 0x02C6, 0x0000, 0x0088,
|
||||
/* 0007 */ 0x02DC, 0x0000, 0x0098,
|
||||
/* 0008 */ 0x2013, 0x203A, 0x000B,
|
||||
/* 0009 */ 0x20AC, 0x0000, 0x0080,
|
||||
/* 000A */ 0x2122, 0x0000, 0x0099,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0028 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x008C, 0x009C, 0x008A, 0x009A, 0x009F, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0xFFFD, 0x008E, 0x009E, 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0010 */ 0x0091, 0x0092, 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD,
|
||||
/* 0018 */ 0x0086, 0x0087, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD,
|
||||
/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0028 */ 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0030 */ 0xFFFD, 0x008B, 0x009B,
|
||||
/* End of table Total Length = 0x005B * 2 */
|
||||
@ -1,153 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00A3
|
||||
srcEnd = 00A9
|
||||
destBegin = 00A3
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 038E
|
||||
srcEnd = 03A1
|
||||
destBegin = 00BE
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 03A3
|
||||
srcEnd = 03CE
|
||||
destBegin = 00D3
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00BD
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD 00AB 00AC 00AD 00AE FFFD
|
||||
00B0 00B1 00B2 00B3 FFFD 00B5 00B6 00B7
|
||||
FFFD FFFD FFFD 00BB FFFD 00BD
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 0192
|
||||
destBegin = 0083
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 1
|
||||
srcBegin = 0384
|
||||
srcEnd = 038C
|
||||
mappingOffset = 001E
|
||||
Mapping =
|
||||
00B4 00A1 00A2 FFFD 00B8 00B9 00BA FFFD
|
||||
00BC
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 1
|
||||
srcBegin = 2013
|
||||
srcEnd = 203A
|
||||
mappingOffset = 0027
|
||||
Mapping =
|
||||
0096 0097 00AF FFFD FFFD 0091 0092 0082
|
||||
FFFD 0093 0094 0084 FFFD 0086 0087 0095
|
||||
FFFD FFFD FFFD 0085 FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 0089 FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 008B 009B
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 2
|
||||
srcBegin = 20AC
|
||||
destBegin = 0080
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 2122
|
||||
destBegin = 0099
|
||||
End of Item 0009
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x000A,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0007,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0025,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0004 */
|
||||
/* Total of Format 1 : 0x0003 */
|
||||
/* Total of Format 2 : 0x0003 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x1121, 0x0022,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0007 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007F, 0x0000,
|
||||
/* 0001 */ 0x00A3, 0x00A9, 0x00A3,
|
||||
/* 0002 */ 0x038E, 0x03A1, 0x00BE,
|
||||
/* 0003 */ 0x03A3, 0x03CE, 0x00D3,
|
||||
/* 0004 */ 0x00A0, 0x00BD, 0x0000,
|
||||
/* 0005 */ 0x0192, 0x0000, 0x0083,
|
||||
/* 0006 */ 0x0384, 0x038C, 0x001E,
|
||||
/* 0007 */ 0x2013, 0x203A, 0x0027,
|
||||
/* 0008 */ 0x20AC, 0x0000, 0x0080,
|
||||
/* 0009 */ 0x2122, 0x0000, 0x0099,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0025 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0xFFFD,
|
||||
/* 0010 */ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0xFFFD, 0x00B5, 0x00B6, 0x00B7,
|
||||
/* 0018 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00BB, 0xFFFD, 0x00BD, 0x00B4, 0x00A1,
|
||||
/* 0020 */ 0x00A2, 0xFFFD, 0x00B8, 0x00B9, 0x00BA, 0xFFFD, 0x00BC, 0x0096,
|
||||
/* 0028 */ 0x0097, 0x00AF, 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD,
|
||||
/* 0030 */ 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD,
|
||||
/* 0038 */ 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0040 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0048 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, 0x009B,
|
||||
/* End of table Total Length = 0x0074 * 2 */
|
||||
@ -1,194 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00CF
|
||||
destBegin = 00A0
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 00D1
|
||||
srcEnd = 00DC
|
||||
destBegin = 00D1
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 00DF
|
||||
srcEnd = 00EF
|
||||
destBegin = 00DF
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 0
|
||||
srcBegin = 00F1
|
||||
srcEnd = 00FC
|
||||
destBegin = 00F1
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 00FF
|
||||
destBegin = 00FF
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 1
|
||||
srcBegin = 011E
|
||||
srcEnd = 011F
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00D0 00F0
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 1
|
||||
srcBegin = 0130
|
||||
srcEnd = 0131
|
||||
mappingOffset = 0002
|
||||
Mapping =
|
||||
00DD 00FD
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 1
|
||||
srcBegin = 0152
|
||||
srcEnd = 0161
|
||||
mappingOffset = 0004
|
||||
Mapping =
|
||||
008C 009C FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00DE 00FE 008A 009A
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 0178
|
||||
destBegin = 009F
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 0192
|
||||
destBegin = 0083
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 2
|
||||
srcBegin = 02C6
|
||||
destBegin = 0088
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 2
|
||||
srcBegin = 02DC
|
||||
destBegin = 0098
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 1
|
||||
srcBegin = 2013
|
||||
srcEnd = 203A
|
||||
mappingOffset = 0014
|
||||
Mapping =
|
||||
0096 0097 FFFD FFFD FFFD 0091 0092 0082
|
||||
FFFD 0093 0094 0084 FFFD 0086 0087 0095
|
||||
FFFD FFFD FFFD 0085 FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 0089 FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 008B 009B
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 2
|
||||
srcBegin = 20AC
|
||||
destBegin = 0080
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 2
|
||||
srcBegin = 2122
|
||||
destBegin = 0099
|
||||
End of Item 000F
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0010,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0009,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0039,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0005 */
|
||||
/* Total of Format 1 : 0x0004 */
|
||||
/* Total of Format 2 : 0x0007 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x1120, 0x2221, 0x2212, 0x0000,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0009 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007F, 0x0000,
|
||||
/* 0001 */ 0x00A0, 0x00CF, 0x00A0,
|
||||
/* 0002 */ 0x00D1, 0x00DC, 0x00D1,
|
||||
/* 0003 */ 0x00DF, 0x00EF, 0x00DF,
|
||||
/* 0004 */ 0x00F1, 0x00FC, 0x00F1,
|
||||
/* 0005 */ 0x00FF, 0x0000, 0x00FF,
|
||||
/* 0006 */ 0x011E, 0x011F, 0x0000,
|
||||
/* 0007 */ 0x0130, 0x0131, 0x0002,
|
||||
/* 0008 */ 0x0152, 0x0161, 0x0004,
|
||||
/* 0009 */ 0x0178, 0x0000, 0x009F,
|
||||
/* 000A */ 0x0192, 0x0000, 0x0083,
|
||||
/* 000B */ 0x02C6, 0x0000, 0x0088,
|
||||
/* 000C */ 0x02DC, 0x0000, 0x0098,
|
||||
/* 000D */ 0x2013, 0x203A, 0x0014,
|
||||
/* 000E */ 0x20AC, 0x0000, 0x0080,
|
||||
/* 000F */ 0x2122, 0x0000, 0x0099,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0039 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00D0, 0x00F0, 0x00DD, 0x00FD, 0x008C, 0x009C, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0010 */ 0x00DE, 0x00FE, 0x008A, 0x009A, 0x0096, 0x0097, 0xFFFD, 0xFFFD,
|
||||
/* 0018 */ 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084,
|
||||
/* 0020 */ 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085,
|
||||
/* 0028 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0030 */ 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0038 */ 0xFFFD, 0xFFFD, 0x008B, 0x009B,
|
||||
/* End of table Total Length = 0x0075 * 2 */
|
||||
@ -1,199 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00AB
|
||||
srcEnd = 00B9
|
||||
destBegin = 00AB
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 05B0
|
||||
srcEnd = 05B9
|
||||
destBegin = 00C0
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 05BB
|
||||
srcEnd = 05C3
|
||||
destBegin = 00CB
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 0
|
||||
srcBegin = 05D0
|
||||
srcEnd = 05EA
|
||||
destBegin = 00E0
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00A9
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 00A1 00A2 00A3 FFFD 00A5 00A6 00A7
|
||||
00A8 00A9
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 1
|
||||
srcBegin = 00BB
|
||||
srcEnd = 00BF
|
||||
mappingOffset = 000A
|
||||
Mapping =
|
||||
00BB 00BC 00BD 00BE 00BF
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 00D7
|
||||
destBegin = 00AA
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 2
|
||||
srcBegin = 00F7
|
||||
destBegin = 00BA
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 0192
|
||||
destBegin = 0083
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 02C6
|
||||
destBegin = 0088
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 2
|
||||
srcBegin = 02DC
|
||||
destBegin = 0098
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 1
|
||||
srcBegin = 05F0
|
||||
srcEnd = 05F4
|
||||
mappingOffset = 000F
|
||||
Mapping =
|
||||
00D4 00D5 00D6 00D7 00D8
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 1
|
||||
srcBegin = 200E
|
||||
srcEnd = 203A
|
||||
mappingOffset = 0014
|
||||
Mapping =
|
||||
00FD 00FE FFFD FFFD FFFD 0096 0097 FFFD
|
||||
FFFD FFFD 0091 0092 0082 FFFD 0093 0094
|
||||
0084 FFFD 0086 0087 0095 FFFD FFFD FFFD
|
||||
0085 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 0089 FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD 008B 009B
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 1
|
||||
srcBegin = 20AA
|
||||
srcEnd = 20AC
|
||||
mappingOffset = 0041
|
||||
Mapping =
|
||||
00A4 FFFD 0080
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 2
|
||||
srcBegin = 2122
|
||||
destBegin = 0099
|
||||
End of Item 000F
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0010,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0009,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0039,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0005 */
|
||||
/* Total of Format 1 : 0x0005 */
|
||||
/* Total of Format 2 : 0x0006 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x2110, 0x2222, 0x2111, 0x0000,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0009 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007F, 0x0000,
|
||||
/* 0001 */ 0x00AB, 0x00B9, 0x00AB,
|
||||
/* 0002 */ 0x05B0, 0x05B9, 0x00C0,
|
||||
/* 0003 */ 0x05BB, 0x05C3, 0x00CB,
|
||||
/* 0004 */ 0x05D0, 0x05EA, 0x00E0,
|
||||
/* 0005 */ 0x00A0, 0x00A9, 0x0000,
|
||||
/* 0006 */ 0x00BB, 0x00BF, 0x000A,
|
||||
/* 0007 */ 0x00D7, 0x0000, 0x00AA,
|
||||
/* 0008 */ 0x00F7, 0x0000, 0x00BA,
|
||||
/* 0009 */ 0x0192, 0x0000, 0x0083,
|
||||
/* 000A */ 0x02C6, 0x0000, 0x0088,
|
||||
/* 000B */ 0x02DC, 0x0000, 0x0098,
|
||||
/* 000C */ 0x05F0, 0x05F4, 0x000F,
|
||||
/* 000D */ 0x200E, 0x203A, 0x0014,
|
||||
/* 000E */ 0x20AA, 0x20AC, 0x0041,
|
||||
/* 000F */ 0x2122, 0x0000, 0x0099,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0039 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0xFFFD, 0x00A5, 0x00A6, 0x00A7,
|
||||
/* 0008 */ 0x00A8, 0x00A9, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, 0x00D4,
|
||||
/* 0010 */ 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00FD, 0x00FE, 0xFFFD, 0xFFFD,
|
||||
/* 0018 */ 0xFFFD, 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092,
|
||||
/* 0020 */ 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087,
|
||||
/* 0028 */ 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD,
|
||||
/* 0038 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B,
|
||||
/* 0040 */ 0x009B, 0x00A4, 0xFFFD, 0x0080,
|
||||
/* End of table Total Length = 0x007D * 2 */
|
||||
@ -1,240 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00A2
|
||||
srcEnd = 00A9
|
||||
destBegin = 00A2
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 00AB
|
||||
srcEnd = 00B9
|
||||
destBegin = 00AB
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 0621
|
||||
srcEnd = 0636
|
||||
destBegin = 00C1
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 2
|
||||
srcBegin = 00A0
|
||||
destBegin = 00A0
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 00BB
|
||||
srcEnd = 00BE
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00BB 00BC 00BD 00BE
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 1
|
||||
srcBegin = 00D7
|
||||
srcEnd = 00FC
|
||||
mappingOffset = 0004
|
||||
Mapping =
|
||||
00D7 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD 00E0 FFFD 00E2 FFFD FFFD FFFD FFFD
|
||||
00E7 00E8 00E9 00EA 00EB FFFD FFFD 00EE
|
||||
00EF FFFD FFFD FFFD FFFD 00F4 FFFD FFFD
|
||||
00F7 FFFD 00F9 FFFD 00FB 00FC
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 1
|
||||
srcBegin = 0152
|
||||
srcEnd = 0153
|
||||
mappingOffset = 002A
|
||||
Mapping =
|
||||
008C 009C
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 2
|
||||
srcBegin = 0192
|
||||
destBegin = 0083
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 02C6
|
||||
destBegin = 0088
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 060C
|
||||
destBegin = 00A1
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 1
|
||||
srcBegin = 061B
|
||||
srcEnd = 061F
|
||||
mappingOffset = 002C
|
||||
Mapping =
|
||||
00BA FFFD FFFD FFFD 00BF
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 1
|
||||
srcBegin = 0637
|
||||
srcEnd = 0652
|
||||
mappingOffset = 0031
|
||||
Mapping =
|
||||
00D8 00D9 00DA 00DB FFFD FFFD FFFD FFFD
|
||||
FFFD 00DC 00DD 00DE 00DF 00E1 00E3 00E4
|
||||
00E5 00E6 00EC 00ED 00F0 00F1 00F2 00F3
|
||||
00F5 00F6 00F8 00FA
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 1
|
||||
srcBegin = 067E
|
||||
srcEnd = 0686
|
||||
mappingOffset = 004D
|
||||
Mapping =
|
||||
0081 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
008D
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 2
|
||||
srcBegin = 0698
|
||||
destBegin = 008E
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 2
|
||||
srcBegin = 06AF
|
||||
destBegin = 0090
|
||||
End of Item 000F
|
||||
|
||||
Begin of Item 0010
|
||||
Format 1
|
||||
srcBegin = 200C
|
||||
srcEnd = 203A
|
||||
mappingOffset = 0056
|
||||
Mapping =
|
||||
009D 009E 00FD 00FE FFFD FFFD FFFD 0096
|
||||
0097 FFFD FFFD FFFD 0091 0092 0082 FFFD
|
||||
0093 0094 0084 FFFD 0086 0087 0095 FFFD
|
||||
FFFD FFFD 0085 FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 0089 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 008B 009B
|
||||
End of Item 0010
|
||||
|
||||
Begin of Item 0011
|
||||
Format 2
|
||||
srcBegin = 20AC
|
||||
destBegin = 0080
|
||||
End of Item 0011
|
||||
|
||||
Begin of Item 0012
|
||||
Format 2
|
||||
srcBegin = 2122
|
||||
destBegin = 0099
|
||||
End of Item 0012
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0013,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0009,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0042,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0004 */
|
||||
/* Total of Format 1 : 0x0007 */
|
||||
/* Total of Format 2 : 0x0008 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x1112, 0x1222, 0x2211, 0x0221,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0009 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007F, 0x0000,
|
||||
/* 0001 */ 0x00A2, 0x00A9, 0x00A2,
|
||||
/* 0002 */ 0x00AB, 0x00B9, 0x00AB,
|
||||
/* 0003 */ 0x0621, 0x0636, 0x00C1,
|
||||
/* 0004 */ 0x00A0, 0x0000, 0x00A0,
|
||||
/* 0005 */ 0x00BB, 0x00BE, 0x0000,
|
||||
/* 0006 */ 0x00D7, 0x00FC, 0x0004,
|
||||
/* 0007 */ 0x0152, 0x0153, 0x002A,
|
||||
/* 0008 */ 0x0192, 0x0000, 0x0083,
|
||||
/* 0009 */ 0x02C6, 0x0000, 0x0088,
|
||||
/* 000A */ 0x060C, 0x0000, 0x00A1,
|
||||
/* 000B */ 0x061B, 0x061F, 0x002C,
|
||||
/* 000C */ 0x0637, 0x0652, 0x0031,
|
||||
/* 000D */ 0x067E, 0x0686, 0x004D,
|
||||
/* 000E */ 0x0698, 0x0000, 0x008E,
|
||||
/* 000F */ 0x06AF, 0x0000, 0x0090,
|
||||
/* 0010 */ 0x200C, 0x203A, 0x0056,
|
||||
/* 0011 */ 0x20AC, 0x0000, 0x0080,
|
||||
/* 0012 */ 0x2122, 0x0000, 0x0099,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0042 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00D7, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00E0, 0xFFFD, 0x00E2,
|
||||
/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00E7, 0x00E8, 0x00E9, 0x00EA,
|
||||
/* 0018 */ 0x00EB, 0xFFFD, 0xFFFD, 0x00EE, 0x00EF, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0020 */ 0xFFFD, 0x00F4, 0xFFFD, 0xFFFD, 0x00F7, 0xFFFD, 0x00F9, 0xFFFD,
|
||||
/* 0028 */ 0x00FB, 0x00FC, 0x008C, 0x009C, 0x00BA, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0030 */ 0x00BF, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0038 */ 0xFFFD, 0xFFFD, 0x00DC, 0x00DD, 0x00DE, 0x00DF, 0x00E1, 0x00E3,
|
||||
/* 0040 */ 0x00E4, 0x00E5, 0x00E6, 0x00EC, 0x00ED, 0x00F0, 0x00F1, 0x00F2,
|
||||
/* 0048 */ 0x00F3, 0x00F5, 0x00F6, 0x00F8, 0x00FA, 0x0081, 0xFFFD, 0xFFFD,
|
||||
/* 0050 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008D, 0x009D, 0x009E,
|
||||
/* 0058 */ 0x00FD, 0x00FE, 0xFFFD, 0xFFFD, 0xFFFD, 0x0096, 0x0097, 0xFFFD,
|
||||
/* 0060 */ 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD, 0x0093, 0x0094,
|
||||
/* 0068 */ 0x0084, 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0070 */ 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0078 */ 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0080 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, 0x009B,
|
||||
/* End of table Total Length = 0x00C7 * 2 */
|
||||
@ -1,184 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00B0
|
||||
srcEnd = 00B7
|
||||
destBegin = 00B0
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 017E
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00A0 FFFD 00A2 00A3 00A4 FFFD 00A6 00A7
|
||||
008D 00A9 FFFD 00AB 00AC 00AD 00AE 009D
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
008F 00B9 FFFD 00BB 00BC 00BD 00BE FFFD
|
||||
FFFD FFFD FFFD FFFD 00C4 00C5 00AF FFFD
|
||||
FFFD 00C9 FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD 00D3 FFFD 00D5 00D6 00D7
|
||||
00A8 FFFD FFFD FFFD 00DC FFFD FFFD 00DF
|
||||
FFFD FFFD FFFD FFFD 00E4 00E5 00BF FFFD
|
||||
FFFD 00E9 FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD 00F3 FFFD 00F5 00F6 00F7
|
||||
00B8 FFFD FFFD FFFD 00FC FFFD FFFD FFFD
|
||||
00C2 00E2 FFFD FFFD 00C0 00E0 00C3 00E3
|
||||
FFFD FFFD FFFD FFFD 00C8 00E8 FFFD FFFD
|
||||
FFFD FFFD 00C7 00E7 FFFD FFFD 00CB 00EB
|
||||
00C6 00E6 FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 00CC 00EC FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 00CE 00EE FFFD FFFD 00C1 00E1
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 00CD 00ED
|
||||
FFFD FFFD FFFD 00CF 00EF FFFD FFFD FFFD
|
||||
FFFD 00D9 00F9 00D1 00F1 00D2 00F2 FFFD
|
||||
FFFD FFFD FFFD FFFD 00D4 00F4 FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 00AA 00BA
|
||||
FFFD FFFD 00DA 00FA FFFD FFFD FFFD FFFD
|
||||
00D0 00F0 FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 00DB 00FB FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 00D8 00F8 FFFD FFFD FFFD FFFD
|
||||
FFFD 00CA 00EA 00DD 00FD 00DE 00FE
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 2
|
||||
srcBegin = 02C7
|
||||
destBegin = 008E
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 1
|
||||
srcBegin = 02D9
|
||||
srcEnd = 02DB
|
||||
mappingOffset = 00DF
|
||||
Mapping =
|
||||
00FF FFFD 009E
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 2013
|
||||
srcEnd = 203A
|
||||
mappingOffset = 00E2
|
||||
Mapping =
|
||||
0096 0097 FFFD FFFD FFFD 0091 0092 0082
|
||||
FFFD 0093 0094 0084 FFFD 0086 0087 0095
|
||||
FFFD FFFD FFFD 0085 FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 0089 FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 008B 009B
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 20AC
|
||||
destBegin = 0080
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 2122
|
||||
destBegin = 0099
|
||||
End of Item 0007
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0008,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0007,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x001F,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0002 */
|
||||
/* Total of Format 1 : 0x0003 */
|
||||
/* Total of Format 2 : 0x0003 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x2100, 0x2211, 0x0000,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0007 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007F, 0x0000,
|
||||
/* 0001 */ 0x00B0, 0x00B7, 0x00B0,
|
||||
/* 0002 */ 0x00A0, 0x017E, 0x0000,
|
||||
/* 0003 */ 0x02C7, 0x0000, 0x008E,
|
||||
/* 0004 */ 0x02D9, 0x02DB, 0x00DF,
|
||||
/* 0005 */ 0x2013, 0x203A, 0x00E2,
|
||||
/* 0006 */ 0x20AC, 0x0000, 0x0080,
|
||||
/* 0007 */ 0x2122, 0x0000, 0x0099,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x001F Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00A0, 0xFFFD, 0x00A2, 0x00A3, 0x00A4, 0xFFFD, 0x00A6, 0x00A7,
|
||||
/* 0008 */ 0x008D, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x009D,
|
||||
/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0018 */ 0x008F, 0x00B9, 0xFFFD, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0xFFFD,
|
||||
/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C4, 0x00C5, 0x00AF, 0xFFFD,
|
||||
/* 0028 */ 0xFFFD, 0x00C9, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00D3, 0xFFFD, 0x00D5, 0x00D6, 0x00D7,
|
||||
/* 0038 */ 0x00A8, 0xFFFD, 0xFFFD, 0xFFFD, 0x00DC, 0xFFFD, 0xFFFD, 0x00DF,
|
||||
/* 0040 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00E4, 0x00E5, 0x00BF, 0xFFFD,
|
||||
/* 0048 */ 0xFFFD, 0x00E9, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0050 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00F3, 0xFFFD, 0x00F5, 0x00F6, 0x00F7,
|
||||
/* 0058 */ 0x00B8, 0xFFFD, 0xFFFD, 0xFFFD, 0x00FC, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0060 */ 0x00C2, 0x00E2, 0xFFFD, 0xFFFD, 0x00C0, 0x00E0, 0x00C3, 0x00E3,
|
||||
/* 0068 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C8, 0x00E8, 0xFFFD, 0xFFFD,
|
||||
/* 0070 */ 0xFFFD, 0xFFFD, 0x00C7, 0x00E7, 0xFFFD, 0xFFFD, 0x00CB, 0x00EB,
|
||||
/* 0078 */ 0x00C6, 0x00E6, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0080 */ 0xFFFD, 0xFFFD, 0x00CC, 0x00EC, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0088 */ 0xFFFD, 0xFFFD, 0x00CE, 0x00EE, 0xFFFD, 0xFFFD, 0x00C1, 0x00E1,
|
||||
/* 0090 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00CD, 0x00ED,
|
||||
/* 0098 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00CF, 0x00EF, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00A0 */ 0xFFFD, 0x00D9, 0x00F9, 0x00D1, 0x00F1, 0x00D2, 0x00F2, 0xFFFD,
|
||||
/* 00A8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D4, 0x00F4, 0xFFFD, 0xFFFD,
|
||||
/* 00B0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AA, 0x00BA,
|
||||
/* 00B8 */ 0xFFFD, 0xFFFD, 0x00DA, 0x00FA, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00C0 */ 0x00D0, 0x00F0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00C8 */ 0xFFFD, 0xFFFD, 0x00DB, 0x00FB, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00D0 */ 0xFFFD, 0xFFFD, 0x00D8, 0x00F8, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00D8 */ 0xFFFD, 0x00CA, 0x00EA, 0x00DD, 0x00FD, 0x00DE, 0x00FE, 0x00FF,
|
||||
/* 00E0 */ 0xFFFD, 0x009E, 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091,
|
||||
/* 00E8 */ 0x0092, 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086,
|
||||
/* 00F0 */ 0x0087, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD,
|
||||
/* 00F8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089,
|
||||
/* 0100 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0108 */ 0x008B, 0x009B,
|
||||
/* End of table Total Length = 0x0129 * 2 */
|
||||
@ -1,257 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00C2
|
||||
destBegin = 00A0
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 00C4
|
||||
srcEnd = 00CB
|
||||
destBegin = 00C4
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 00D6
|
||||
srcEnd = 00DC
|
||||
destBegin = 00D6
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 0
|
||||
srcBegin = 00E4
|
||||
srcEnd = 00EB
|
||||
destBegin = 00E4
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 0
|
||||
srcBegin = 00F6
|
||||
srcEnd = 00FC
|
||||
destBegin = 00F6
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 1
|
||||
srcBegin = 00CD
|
||||
srcEnd = 0103
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00CD 00CE 00CF FFFD 00D1 FFFD 00D3 00D4
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 00DF 00E0 00E1 00E2 FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
00ED 00EE 00EF FFFD 00F1 FFFD 00F3 00F4
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 00FF FFFD FFFD 00C3 00E3
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 1
|
||||
srcBegin = 0110
|
||||
srcEnd = 0111
|
||||
mappingOffset = 0037
|
||||
Mapping =
|
||||
00D0 00F0
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 1
|
||||
srcBegin = 0152
|
||||
srcEnd = 0153
|
||||
mappingOffset = 0039
|
||||
Mapping =
|
||||
008C 009C
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 0178
|
||||
destBegin = 009F
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 0192
|
||||
destBegin = 0083
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 1
|
||||
srcBegin = 01A0
|
||||
srcEnd = 01A1
|
||||
mappingOffset = 003B
|
||||
Mapping =
|
||||
00D5 00F5
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 1
|
||||
srcBegin = 01AF
|
||||
srcEnd = 01B0
|
||||
mappingOffset = 003D
|
||||
Mapping =
|
||||
00DD 00FD
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 2
|
||||
srcBegin = 02C6
|
||||
destBegin = 0088
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 2
|
||||
srcBegin = 02DC
|
||||
destBegin = 0098
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 1
|
||||
srcBegin = 0303
|
||||
srcEnd = 0309
|
||||
mappingOffset = 003F
|
||||
Mapping =
|
||||
00DE FFFD FFFD FFFD FFFD FFFD 00D2
|
||||
End of Item 000F
|
||||
|
||||
Begin of Item 0010
|
||||
Format 2
|
||||
srcBegin = 0323
|
||||
destBegin = 00F2
|
||||
End of Item 0010
|
||||
|
||||
Begin of Item 0011
|
||||
Format 1
|
||||
srcBegin = 0340
|
||||
srcEnd = 0341
|
||||
mappingOffset = 0046
|
||||
Mapping =
|
||||
00CC 00EC
|
||||
End of Item 0011
|
||||
|
||||
Begin of Item 0012
|
||||
Format 1
|
||||
srcBegin = 2013
|
||||
srcEnd = 203A
|
||||
mappingOffset = 0048
|
||||
Mapping =
|
||||
0096 0097 FFFD FFFD FFFD 0091 0092 0082
|
||||
FFFD 0093 0094 0084 FFFD 0086 0087 0095
|
||||
FFFD FFFD FFFD 0085 FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 0089 FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 008B 009B
|
||||
End of Item 0012
|
||||
|
||||
Begin of Item 0013
|
||||
Format 1
|
||||
srcBegin = 20AB
|
||||
srcEnd = 20AC
|
||||
mappingOffset = 0070
|
||||
Mapping =
|
||||
00FE 0080
|
||||
End of Item 0013
|
||||
|
||||
Begin of Item 0014
|
||||
Format 2
|
||||
srcBegin = 2122
|
||||
destBegin = 0099
|
||||
End of Item 0014
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0015,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x000A,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0049,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0006 */
|
||||
/* Total of Format 1 : 0x0009 */
|
||||
/* Total of Format 2 : 0x0006 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x1100, 0x1221, 0x1221, 0x1112, 0x0002,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x000A Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007F, 0x0000,
|
||||
/* 0001 */ 0x00A0, 0x00C2, 0x00A0,
|
||||
/* 0002 */ 0x00C4, 0x00CB, 0x00C4,
|
||||
/* 0003 */ 0x00D6, 0x00DC, 0x00D6,
|
||||
/* 0004 */ 0x00E4, 0x00EB, 0x00E4,
|
||||
/* 0005 */ 0x00F6, 0x00FC, 0x00F6,
|
||||
/* 0006 */ 0x00CD, 0x0103, 0x0000,
|
||||
/* 0007 */ 0x0110, 0x0111, 0x0037,
|
||||
/* 0008 */ 0x0152, 0x0153, 0x0039,
|
||||
/* 0009 */ 0x0178, 0x0000, 0x009F,
|
||||
/* 000A */ 0x0192, 0x0000, 0x0083,
|
||||
/* 000B */ 0x01A0, 0x01A1, 0x003B,
|
||||
/* 000C */ 0x01AF, 0x01B0, 0x003D,
|
||||
/* 000D */ 0x02C6, 0x0000, 0x0088,
|
||||
/* 000E */ 0x02DC, 0x0000, 0x0098,
|
||||
/* 000F */ 0x0303, 0x0309, 0x003F,
|
||||
/* 0010 */ 0x0323, 0x0000, 0x00F2,
|
||||
/* 0011 */ 0x0340, 0x0341, 0x0046,
|
||||
/* 0012 */ 0x2013, 0x203A, 0x0048,
|
||||
/* 0013 */ 0x20AB, 0x20AC, 0x0070,
|
||||
/* 0014 */ 0x2122, 0x0000, 0x0099,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0049 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00CD, 0x00CE, 0x00CF, 0xFFFD, 0x00D1, 0xFFFD, 0x00D3, 0x00D4,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0010 */ 0xFFFD, 0xFFFD, 0x00DF, 0x00E0, 0x00E1, 0x00E2, 0xFFFD, 0xFFFD,
|
||||
/* 0018 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0020 */ 0x00ED, 0x00EE, 0x00EF, 0xFFFD, 0x00F1, 0xFFFD, 0x00F3, 0x00F4,
|
||||
/* 0028 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0030 */ 0xFFFD, 0xFFFD, 0x00FF, 0xFFFD, 0xFFFD, 0x00C3, 0x00E3, 0x00D0,
|
||||
/* 0038 */ 0x00F0, 0x008C, 0x009C, 0x00D5, 0x00F5, 0x00DD, 0x00FD, 0x00DE,
|
||||
/* 0040 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D2, 0x00CC, 0x00EC,
|
||||
/* 0048 */ 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0x0082,
|
||||
/* 0050 */ 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, 0x0095,
|
||||
/* 0058 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0060 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, 0xFFFD,
|
||||
/* 0068 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, 0x009B,
|
||||
/* 0070 */ 0x00FE, 0x0080,
|
||||
/* End of table Total Length = 0x00BB * 2 */
|
||||
@ -1,253 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00FF
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00FF 00AD 009B 009C FFFD 009D FFFD FFFD
|
||||
FFFD FFFD 00A6 00AE 00AA FFFD FFFD FFFD
|
||||
00F8 00F1 00FD FFFD FFFD 00E6 FFFD 00FA
|
||||
FFFD FFFD 00A7 00AF 00AC 00AB FFFD 00A8
|
||||
FFFD FFFD FFFD FFFD 008E 008F 0092 0080
|
||||
FFFD 0090 FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD 00A5 FFFD FFFD FFFD FFFD 0099 FFFD
|
||||
FFFD FFFD FFFD FFFD 009A FFFD FFFD 00E1
|
||||
0085 00A0 0083 FFFD 0084 0086 0091 0087
|
||||
008A 0082 0088 0089 008D 00A1 008C 008B
|
||||
FFFD 00A4 0095 00A2 0093 FFFD 0094 00F6
|
||||
FFFD 0097 00A3 0096 0081 FFFD FFFD 0098
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 2
|
||||
srcBegin = 0192
|
||||
destBegin = 009F
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 1
|
||||
srcBegin = 0393
|
||||
srcEnd = 03C6
|
||||
mappingOffset = 0060
|
||||
Mapping =
|
||||
00E2 FFFD FFFD FFFD FFFD 00E9 FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
00E4 FFFD FFFD 00E8 FFFD FFFD 00EA FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 00E0 FFFD
|
||||
FFFD 00EB 00EE FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 00E3 FFFD FFFD
|
||||
00E5 00E7 FFFD 00ED
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 2
|
||||
srcBegin = 207F
|
||||
destBegin = 00FC
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 20A7
|
||||
destBegin = 009E
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 1
|
||||
srcBegin = 2219
|
||||
srcEnd = 2229
|
||||
mappingOffset = 0094
|
||||
Mapping =
|
||||
00F9 00FB FFFD FFFD FFFD 00EC FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
00EF
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 2248
|
||||
destBegin = 00F7
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 1
|
||||
srcBegin = 2261
|
||||
srcEnd = 2265
|
||||
mappingOffset = 00A5
|
||||
Mapping =
|
||||
00F0 FFFD FFFD 00F3 00F2
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 2310
|
||||
destBegin = 00A9
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 1
|
||||
srcBegin = 2320
|
||||
srcEnd = 2321
|
||||
mappingOffset = 00AA
|
||||
Mapping =
|
||||
00F4 00F5
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 1
|
||||
srcBegin = 2500
|
||||
srcEnd = 253C
|
||||
mappingOffset = 00AC
|
||||
Mapping =
|
||||
00C4 FFFD 00B3 FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00DA FFFD FFFD FFFD
|
||||
00BF FFFD FFFD FFFD 00C0 FFFD FFFD FFFD
|
||||
00D9 FFFD FFFD FFFD 00C3 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00B4 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00C2 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00C1 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00C5
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 1
|
||||
srcBegin = 2550
|
||||
srcEnd = 256C
|
||||
mappingOffset = 00E9
|
||||
Mapping =
|
||||
00CD 00BA 00D5 00D6 00C9 00B8 00B7 00BB
|
||||
00D4 00D3 00C8 00BE 00BD 00BC 00C6 00C7
|
||||
00CC 00B5 00B6 00B9 00D1 00D2 00CB 00CF
|
||||
00D0 00CA 00D8 00D7 00CE
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 1
|
||||
srcBegin = 2580
|
||||
srcEnd = 2593
|
||||
mappingOffset = 0106
|
||||
Mapping =
|
||||
00DF FFFD FFFD FFFD 00DC FFFD FFFD FFFD
|
||||
00DB FFFD FFFD FFFD 00DD FFFD FFFD FFFD
|
||||
00DE 00B0 00B1 00B2
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 2
|
||||
srcBegin = 25A0
|
||||
destBegin = 00FE
|
||||
End of Item 000E
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x000F,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0008,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0035,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0001 */
|
||||
/* Total of Format 1 : 0x0008 */
|
||||
/* Total of Format 2 : 0x0006 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x1210, 0x2122, 0x1121, 0x0211,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0008 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007F, 0x0000,
|
||||
/* 0001 */ 0x00A0, 0x00FF, 0x0000,
|
||||
/* 0002 */ 0x0192, 0x0000, 0x009F,
|
||||
/* 0003 */ 0x0393, 0x03C6, 0x0060,
|
||||
/* 0004 */ 0x207F, 0x0000, 0x00FC,
|
||||
/* 0005 */ 0x20A7, 0x0000, 0x009E,
|
||||
/* 0006 */ 0x2219, 0x2229, 0x0094,
|
||||
/* 0007 */ 0x2248, 0x0000, 0x00F7,
|
||||
/* 0008 */ 0x2261, 0x2265, 0x00A5,
|
||||
/* 0009 */ 0x2310, 0x0000, 0x00A9,
|
||||
/* 000A */ 0x2320, 0x2321, 0x00AA,
|
||||
/* 000B */ 0x2500, 0x253C, 0x00AC,
|
||||
/* 000C */ 0x2550, 0x256C, 0x00E9,
|
||||
/* 000D */ 0x2580, 0x2593, 0x0106,
|
||||
/* 000E */ 0x25A0, 0x0000, 0x00FE,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0035 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00FF, 0x00AD, 0x009B, 0x009C, 0xFFFD, 0x009D, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0x00A6, 0x00AE, 0x00AA, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0010 */ 0x00F8, 0x00F1, 0x00FD, 0xFFFD, 0xFFFD, 0x00E6, 0xFFFD, 0x00FA,
|
||||
/* 0018 */ 0xFFFD, 0xFFFD, 0x00A7, 0x00AF, 0x00AC, 0x00AB, 0xFFFD, 0x00A8,
|
||||
/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008E, 0x008F, 0x0092, 0x0080,
|
||||
/* 0028 */ 0xFFFD, 0x0090, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0030 */ 0xFFFD, 0x00A5, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0099, 0xFFFD,
|
||||
/* 0038 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x009A, 0xFFFD, 0xFFFD, 0x00E1,
|
||||
/* 0040 */ 0x0085, 0x00A0, 0x0083, 0xFFFD, 0x0084, 0x0086, 0x0091, 0x0087,
|
||||
/* 0048 */ 0x008A, 0x0082, 0x0088, 0x0089, 0x008D, 0x00A1, 0x008C, 0x008B,
|
||||
/* 0050 */ 0xFFFD, 0x00A4, 0x0095, 0x00A2, 0x0093, 0xFFFD, 0x0094, 0x00F6,
|
||||
/* 0058 */ 0xFFFD, 0x0097, 0x00A3, 0x0096, 0x0081, 0xFFFD, 0xFFFD, 0x0098,
|
||||
/* 0060 */ 0x00E2, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00E9, 0xFFFD, 0xFFFD,
|
||||
/* 0068 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0070 */ 0x00E4, 0xFFFD, 0xFFFD, 0x00E8, 0xFFFD, 0xFFFD, 0x00EA, 0xFFFD,
|
||||
/* 0078 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00E0, 0xFFFD,
|
||||
/* 0080 */ 0xFFFD, 0x00EB, 0x00EE, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0088 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00E3, 0xFFFD, 0xFFFD,
|
||||
/* 0090 */ 0x00E5, 0x00E7, 0xFFFD, 0x00ED, 0x00F9, 0x00FB, 0xFFFD, 0xFFFD,
|
||||
/* 0098 */ 0xFFFD, 0x00EC, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00A0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00EF, 0x00F0, 0xFFFD, 0xFFFD,
|
||||
/* 00A8 */ 0x00F3, 0x00F2, 0x00F4, 0x00F5, 0x00C4, 0xFFFD, 0x00B3, 0xFFFD,
|
||||
/* 00B0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00B8 */ 0x00DA, 0xFFFD, 0xFFFD, 0xFFFD, 0x00BF, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00C0 */ 0x00C0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D9, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00C8 */ 0x00C3, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00D0 */ 0x00B4, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00D8 */ 0x00C2, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00E0 */ 0x00C1, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 00E8 */ 0x00C5, 0x00CD, 0x00BA, 0x00D5, 0x00D6, 0x00C9, 0x00B8, 0x00B7,
|
||||
/* 00F0 */ 0x00BB, 0x00D4, 0x00D3, 0x00C8, 0x00BE, 0x00BD, 0x00BC, 0x00C6,
|
||||
/* 00F8 */ 0x00C7, 0x00CC, 0x00B5, 0x00B6, 0x00B9, 0x00D1, 0x00D2, 0x00CB,
|
||||
/* 0100 */ 0x00CF, 0x00D0, 0x00CA, 0x00D8, 0x00D7, 0x00CE, 0x00DF, 0xFFFD,
|
||||
/* 0108 */ 0xFFFD, 0xFFFD, 0x00DC, 0xFFFD, 0xFFFD, 0xFFFD, 0x00DB, 0xFFFD,
|
||||
/* 0110 */ 0xFFFD, 0xFFFD, 0x00DD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00DE, 0x00B0,
|
||||
/* 0118 */ 0x00B1, 0x00B2,
|
||||
/* End of table Total Length = 0x014F * 2 */
|
||||
@ -1,208 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 001F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 0030
|
||||
srcEnd = 0039
|
||||
destBegin = 00F0
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 0041
|
||||
srcEnd = 0049
|
||||
destBegin = 00C1
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 004A
|
||||
srcEnd = 0052
|
||||
destBegin = 00D1
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 0
|
||||
srcBegin = 0053
|
||||
srcEnd = 005A
|
||||
destBegin = 00E2
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 0
|
||||
srcBegin = 0061
|
||||
srcEnd = 0069
|
||||
destBegin = 0081
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 0
|
||||
srcBegin = 006A
|
||||
srcEnd = 0072
|
||||
destBegin = 0091
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 0
|
||||
srcBegin = 0073
|
||||
srcEnd = 007A
|
||||
destBegin = 00A2
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 0
|
||||
srcBegin = F89A
|
||||
srcEnd = F8B9
|
||||
destBegin = 0020
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 1
|
||||
srcBegin = 0020
|
||||
srcEnd = 0040
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
0040 004F 007F 007B 005B 006C 0050 007D
|
||||
004D 005D 005C 004E 006B 0060 004B 0061
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 007A 005E 004C 007E 006E 006F
|
||||
007C
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 1
|
||||
srcBegin = 005B
|
||||
srcEnd = 0060
|
||||
mappingOffset = 0021
|
||||
Mapping =
|
||||
004A 00E0 005A 005F 006D 0079
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 1
|
||||
srcBegin = 007B
|
||||
srcEnd = 007E
|
||||
mappingOffset = 0027
|
||||
Mapping =
|
||||
00C0 00BB 00D0 00A1
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 1
|
||||
srcBegin = 00A0
|
||||
srcEnd = 00FF
|
||||
mappingOffset = 002B
|
||||
Mapping =
|
||||
0041 00AA 00B0 00B1 009F 00B2 006A 00B5
|
||||
00BD 00B4 009A 008A 00BA 00CA 00AF 00BC
|
||||
0090 008F 00EA 00FA 00BE 00A0 00B6 00B3
|
||||
009D 00DA 009B 008B 00B7 00B8 00B9 00AB
|
||||
0064 0065 0062 0066 0063 0067 009E 0068
|
||||
0074 0071 0072 0073 0078 0075 0076 0077
|
||||
00AC 0069 00ED 00EE 00EB 00EF 00EC 00BF
|
||||
0080 00FD 00FE 00FB 00FC 00AD 00AE 0059
|
||||
0044 0045 0042 0046 0043 0047 009C 0048
|
||||
0054 0051 0052 0053 0058 0055 0056 0057
|
||||
008C 0049 00CD 00CE 00CB 00CF 00CC 00E1
|
||||
0070 00DD 00DE 00DB 00DC 008D 008E 00DF
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 2
|
||||
srcBegin = F8BA
|
||||
destBegin = 00FF
|
||||
End of Item 000D
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x000E,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0008,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0032,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0009 */
|
||||
/* Total of Format 1 : 0x0004 */
|
||||
/* Total of Format 2 : 0x0001 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x0000, 0x1110, 0x0021,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0008 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x001F, 0x0000,
|
||||
/* 0001 */ 0x0030, 0x0039, 0x00F0,
|
||||
/* 0002 */ 0x0041, 0x0049, 0x00C1,
|
||||
/* 0003 */ 0x004A, 0x0052, 0x00D1,
|
||||
/* 0004 */ 0x0053, 0x005A, 0x00E2,
|
||||
/* 0005 */ 0x0061, 0x0069, 0x0081,
|
||||
/* 0006 */ 0x006A, 0x0072, 0x0091,
|
||||
/* 0007 */ 0x0073, 0x007A, 0x00A2,
|
||||
/* 0008 */ 0xF89A, 0xF8B9, 0x0020,
|
||||
/* 0009 */ 0x0020, 0x0040, 0x0000,
|
||||
/* 000A */ 0x005B, 0x0060, 0x0021,
|
||||
/* 000B */ 0x007B, 0x007E, 0x0027,
|
||||
/* 000C */ 0x00A0, 0x00FF, 0x002B,
|
||||
/* 000D */ 0xF8BA, 0x0000, 0x00FF,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0032 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x0040, 0x004F, 0x007F, 0x007B, 0x005B, 0x006C, 0x0050, 0x007D,
|
||||
/* 0008 */ 0x004D, 0x005D, 0x005C, 0x004E, 0x006B, 0x0060, 0x004B, 0x0061,
|
||||
/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0018 */ 0xFFFD, 0xFFFD, 0x007A, 0x005E, 0x004C, 0x007E, 0x006E, 0x006F,
|
||||
/* 0020 */ 0x007C, 0x004A, 0x00E0, 0x005A, 0x005F, 0x006D, 0x0079, 0x00C0,
|
||||
/* 0028 */ 0x00BB, 0x00D0, 0x00A1, 0x0041, 0x00AA, 0x00B0, 0x00B1, 0x009F,
|
||||
/* 0030 */ 0x00B2, 0x006A, 0x00B5, 0x00BD, 0x00B4, 0x009A, 0x008A, 0x00BA,
|
||||
/* 0038 */ 0x00CA, 0x00AF, 0x00BC, 0x0090, 0x008F, 0x00EA, 0x00FA, 0x00BE,
|
||||
/* 0040 */ 0x00A0, 0x00B6, 0x00B3, 0x009D, 0x00DA, 0x009B, 0x008B, 0x00B7,
|
||||
/* 0048 */ 0x00B8, 0x00B9, 0x00AB, 0x0064, 0x0065, 0x0062, 0x0066, 0x0063,
|
||||
/* 0050 */ 0x0067, 0x009E, 0x0068, 0x0074, 0x0071, 0x0072, 0x0073, 0x0078,
|
||||
/* 0058 */ 0x0075, 0x0076, 0x0077, 0x00AC, 0x0069, 0x00ED, 0x00EE, 0x00EB,
|
||||
/* 0060 */ 0x00EF, 0x00EC, 0x00BF, 0x0080, 0x00FD, 0x00FE, 0x00FB, 0x00FC,
|
||||
/* 0068 */ 0x00AD, 0x00AE, 0x0059, 0x0044, 0x0045, 0x0042, 0x0046, 0x0043,
|
||||
/* 0070 */ 0x0047, 0x009C, 0x0048, 0x0054, 0x0051, 0x0052, 0x0053, 0x0058,
|
||||
/* 0078 */ 0x0055, 0x0056, 0x0057, 0x008C, 0x0049, 0x00CD, 0x00CE, 0x00CB,
|
||||
/* 0080 */ 0x00CF, 0x00CC, 0x00E1, 0x0070, 0x00DD, 0x00DE, 0x00DB, 0x00DC,
|
||||
/* 0088 */ 0x008D, 0x008E, 0x00DF,
|
||||
/* End of table Total Length = 0x00BD * 2 */
|
||||
@ -1,246 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
/*========================================================
|
||||
This is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 0
|
||||
srcBegin = 0000
|
||||
srcEnd = 007F
|
||||
destBegin = 0000
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 0
|
||||
srcBegin = 0391
|
||||
srcEnd = 03A1
|
||||
destBegin = 0080
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 0
|
||||
srcBegin = 03A3
|
||||
srcEnd = 03A9
|
||||
destBegin = 0091
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 0
|
||||
srcBegin = 03B1
|
||||
srcEnd = 03C1
|
||||
destBegin = 0098
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 2
|
||||
srcBegin = 00A0
|
||||
destBegin = 00FF
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 1
|
||||
srcBegin = 00B0
|
||||
srcEnd = 00B7
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
00F8 00F1 00FD FFFD FFFD FFFD FFFD 00FA
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 00F7
|
||||
destBegin = 00F6
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 1
|
||||
srcBegin = 0386
|
||||
srcEnd = 038F
|
||||
mappingOffset = 0008
|
||||
Mapping =
|
||||
00EA FFFD 00EB 00EC 00ED FFFD 00EE FFFD
|
||||
00EF 00F0
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 1
|
||||
srcBegin = 03AA
|
||||
srcEnd = 03AF
|
||||
mappingOffset = 0012
|
||||
Mapping =
|
||||
00F4 00F5 00E1 00E2 00E3 00E5
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 1
|
||||
srcBegin = 03C2
|
||||
srcEnd = 03CE
|
||||
mappingOffset = 0018
|
||||
Mapping =
|
||||
00AA 00A9 00AB 00AC 00AD 00AE 00AF 00E0
|
||||
00E4 00E8 00E6 00E7 00E9
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 207F
|
||||
destBegin = 00FC
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 1
|
||||
srcBegin = 2219
|
||||
srcEnd = 221A
|
||||
mappingOffset = 0025
|
||||
Mapping =
|
||||
00F9 00FB
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 2
|
||||
srcBegin = 2248
|
||||
destBegin = 00F7
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 1
|
||||
srcBegin = 2264
|
||||
srcEnd = 2265
|
||||
mappingOffset = 0027
|
||||
Mapping =
|
||||
00F3 00F2
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 1
|
||||
srcBegin = 2500
|
||||
srcEnd = 253C
|
||||
mappingOffset = 0029
|
||||
Mapping =
|
||||
00C4 FFFD 00B3 FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00DA FFFD FFFD FFFD
|
||||
00BF FFFD FFFD FFFD 00C0 FFFD FFFD FFFD
|
||||
00D9 FFFD FFFD FFFD 00C3 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00B4 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00C2 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00C1 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 00C5
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 1
|
||||
srcBegin = 2550
|
||||
srcEnd = 256C
|
||||
mappingOffset = 0066
|
||||
Mapping =
|
||||
00CD 00BA 00D5 00D6 00C9 00B8 00B7 00BB
|
||||
00D4 00D3 00C8 00BE 00BD 00BC 00C6 00C7
|
||||
00CC 00B5 00B6 00B9 00D1 00D2 00CB 00CF
|
||||
00D0 00CA 00D8 00D7 00CE
|
||||
End of Item 000F
|
||||
|
||||
Begin of Item 0010
|
||||
Format 1
|
||||
srcBegin = 2580
|
||||
srcEnd = 2593
|
||||
mappingOffset = 0083
|
||||
Mapping =
|
||||
00DF FFFD FFFD FFFD 00DC FFFD FFFD FFFD
|
||||
00DB FFFD FFFD FFFD 00DD FFFD FFFD FFFD
|
||||
00DE 00B0 00B1 00B2
|
||||
End of Item 0010
|
||||
|
||||
Begin of Item 0011
|
||||
Format 2
|
||||
srcBegin = 25A0
|
||||
destBegin = 00FE
|
||||
End of Item 0011
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0012,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0009,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x003F,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0004 */
|
||||
/* Total of Format 1 : 0x0009 */
|
||||
/* Total of Format 2 : 0x0005 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x0000, 0x1212, 0x1211, 0x1112, 0x0021,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0009 Start of MapCell Array */
|
||||
/* 0000 */ 0x0000, 0x007F, 0x0000,
|
||||
/* 0001 */ 0x0391, 0x03A1, 0x0080,
|
||||
/* 0002 */ 0x03A3, 0x03A9, 0x0091,
|
||||
/* 0003 */ 0x03B1, 0x03C1, 0x0098,
|
||||
/* 0004 */ 0x00A0, 0x0000, 0x00FF,
|
||||
/* 0005 */ 0x00B0, 0x00B7, 0x0000,
|
||||
/* 0006 */ 0x00F7, 0x0000, 0x00F6,
|
||||
/* 0007 */ 0x0386, 0x038F, 0x0008,
|
||||
/* 0008 */ 0x03AA, 0x03AF, 0x0012,
|
||||
/* 0009 */ 0x03C2, 0x03CE, 0x0018,
|
||||
/* 000A */ 0x207F, 0x0000, 0x00FC,
|
||||
/* 000B */ 0x2219, 0x221A, 0x0025,
|
||||
/* 000C */ 0x2248, 0x0000, 0x00F7,
|
||||
/* 000D */ 0x2264, 0x2265, 0x0027,
|
||||
/* 000E */ 0x2500, 0x253C, 0x0029,
|
||||
/* 000F */ 0x2550, 0x256C, 0x0066,
|
||||
/* 0010 */ 0x2580, 0x2593, 0x0083,
|
||||
/* 0011 */ 0x25A0, 0x0000, 0x00FE,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x003F Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x00F8, 0x00F1, 0x00FD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00FA,
|
||||
/* 0008 */ 0x00EA, 0xFFFD, 0x00EB, 0x00EC, 0x00ED, 0xFFFD, 0x00EE, 0xFFFD,
|
||||
/* 0010 */ 0x00EF, 0x00F0, 0x00F4, 0x00F5, 0x00E1, 0x00E2, 0x00E3, 0x00E5,
|
||||
/* 0018 */ 0x00AA, 0x00A9, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, 0x00E0,
|
||||
/* 0020 */ 0x00E4, 0x00E8, 0x00E6, 0x00E7, 0x00E9, 0x00F9, 0x00FB, 0x00F3,
|
||||
/* 0028 */ 0x00F2, 0x00C4, 0xFFFD, 0x00B3, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00DA, 0xFFFD, 0xFFFD,
|
||||
/* 0038 */ 0xFFFD, 0x00BF, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C0, 0xFFFD, 0xFFFD,
|
||||
/* 0040 */ 0xFFFD, 0x00D9, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C3, 0xFFFD, 0xFFFD,
|
||||
/* 0048 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00B4, 0xFFFD, 0xFFFD,
|
||||
/* 0050 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C2, 0xFFFD, 0xFFFD,
|
||||
/* 0058 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C1, 0xFFFD, 0xFFFD,
|
||||
/* 0060 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C5, 0x00CD, 0x00BA,
|
||||
/* 0068 */ 0x00D5, 0x00D6, 0x00C9, 0x00B8, 0x00B7, 0x00BB, 0x00D4, 0x00D3,
|
||||
/* 0070 */ 0x00C8, 0x00BE, 0x00BD, 0x00BC, 0x00C6, 0x00C7, 0x00CC, 0x00B5,
|
||||
/* 0078 */ 0x00B6, 0x00B9, 0x00D1, 0x00D2, 0x00CB, 0x00CF, 0x00D0, 0x00CA,
|
||||
/* 0080 */ 0x00D8, 0x00D7, 0x00CE, 0x00DF, 0xFFFD, 0xFFFD, 0xFFFD, 0x00DC,
|
||||
/* 0088 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00DB, 0xFFFD, 0xFFFD, 0xFFFD, 0x00DD,
|
||||
/* 0090 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00DE, 0x00B0, 0x00B1, 0x00B2,
|
||||
/* End of table Total Length = 0x00D6 * 2 */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user