Bug 799913 - Remove dead-code encoders previously used by gfx. r=emk.

This commit is contained in:
Henri Sivonen 2014-01-07 12:41:03 +02:00
parent 70d4f5f61c
commit bac874ca01
18 changed files with 21 additions and 1648 deletions

View File

@ -44,29 +44,28 @@ iso-2022-kr.notForOutgoing = true
x-johab.notForOutgoing = true
replacement.notForOutgoing = true
// XXX : there are some entries only necessary for Gtk/Xlib builds
// to map XLFD registry-encoding pairs to langGroups. they can be
// removed once bug 215537 is fixed.
# XXX : there are some entries only necessary for Gtk/Xlib builds
# to map XLFD registry-encoding pairs to langGroups. they can be
# removed once bug 215537 is fixed.
// XXX : todo: move to something based on BCP 47 (RFC 5646);
// these should primarily specify script (and sometimes region),
// but NOT language.
// See also https://bugzilla.mozilla.org/show_bug.cgi?id=756022
// e.g. x-western -> *-Latn-155 (Western Europe)
// x-central-euro -> *-Latn-151 (Eastern Europe)
// x-baltic -> *-Latn-154 (Northern Europe)
// x-cyrillic -> *-Cyrl
// zh-TW -> *-Hant-TW
// zh-HK -> *-Hant-HK
// zh-CN -> *-Hans
// ja -> *-Jpan
// ko -> *-Hang
// tr -> *-Latn-TR
// he -> *-Hebr
// ar -> *-Arab
// etc
# XXX : todo: move to something based on BCP 47 (RFC 5646);
# these should primarily specify script (and sometimes region),
# but NOT language.
# See also https://bugzilla.mozilla.org/show_bug.cgi?id=756022
# e.g. x-western -> *-Latn-155 (Western Europe)
# x-central-euro -> *-Latn-151 (Eastern Europe)
# x-baltic -> *-Latn-154 (Northern Europe)
# x-cyrillic -> *-Cyrl
# zh-TW -> *-Hant-TW
# zh-HK -> *-Hant-HK
# zh-CN -> *-Hans
# ja -> *-Jpan
# ko -> *-Hang
# tr -> *-Latn-TR
# he -> *-Hebr
# ar -> *-Arab
# etc
adobe-symbol-encoding.LangGroup = el
armscii-8.LangGroup = x-armn
big5.LangGroup = zh-TW
x-x-big5.LangGroup = zh-TW
@ -162,8 +161,6 @@ x-johab.LangGroup = ko
x-mac-hebrew.LangGroup = he
x-mac-arabic.LangGroup = ar
x-sun-unicode-india-0.LangGroup = x-devanagari
x-tscii.LangGroup = x-tamil
x-tamilttf-0.LangGroup = x-tamil
iso-2022-jp.isMultibyte = true
shift_jis.isMultibyte = true

View File

@ -115,7 +115,6 @@ UNIFIED_SOURCES += [
'../ucvlatin/nsT61ToUnicode.cpp',
'../ucvlatin/nsTCVN5712ToUnicode.cpp',
'../ucvlatin/nsTIS620ToUnicode.cpp',
'../ucvlatin/nsUnicodeToAdobeEuro.cpp',
'../ucvlatin/nsUnicodeToARMSCII8.cpp',
'../ucvlatin/nsUnicodeToAscii.cpp',
'../ucvlatin/nsUnicodeToCP1250.cpp',
@ -163,17 +162,14 @@ UNIFIED_SOURCES += [
'../ucvlatin/nsUnicodeToMacRomanian.cpp',
'../ucvlatin/nsUnicodeToMacTurkish.cpp',
'../ucvlatin/nsUnicodeToMUTF7.cpp',
'../ucvlatin/nsUnicodeToSymbol.cpp',
'../ucvlatin/nsUnicodeToT61.cpp',
'../ucvlatin/nsUnicodeToTCVN5712.cpp',
'../ucvlatin/nsUnicodeToTIS620.cpp',
'../ucvlatin/nsUnicodeToTSCII.cpp',
'../ucvlatin/nsUnicodeToUserDefined.cpp',
'../ucvlatin/nsUnicodeToUTF16.cpp',
'../ucvlatin/nsUnicodeToUTF7.cpp',
'../ucvlatin/nsUnicodeToVISCII.cpp',
'../ucvlatin/nsUnicodeToVPS.cpp',
'../ucvlatin/nsUnicodeToZapfDingbat.cpp',
'../ucvlatin/nsUserDefinedToUnicode.cpp',
'../ucvlatin/nsUTF16ToUnicode.cpp',
'../ucvlatin/nsUTF7ToUnicode.cpp',
@ -234,4 +230,4 @@ LOCAL_INCLUDES += [
FINAL_LIBRARY = 'xul'
JAR_MANIFESTS += ['jar.mn']
JAR_MANIFESTS += ['jar.mn']

View File

@ -128,9 +128,6 @@
#include "nsUnicodeToUTF16.h"
#include "nsUnicodeToT61.h"
#include "nsUnicodeToUserDefined.h"
#include "nsUnicodeToSymbol.h"
#include "nsUnicodeToZapfDingbat.h"
#include "nsUnicodeToAdobeEuro.h"
#include "nsMacArabicToUnicode.h"
#include "nsMacDevanagariToUnicode.h"
#include "nsMacFarsiToUnicode.h"
@ -143,7 +140,6 @@
#include "nsUnicodeToMacGujarati.h"
#include "nsUnicodeToMacGurmukhi.h"
#include "nsUnicodeToMacHebrew.h"
#include "nsUnicodeToTSCII.h"
// ucvibm
#include "nsUCvIBMCID.h"
@ -281,11 +277,6 @@ NS_UCONV_REG_UNREG("x-mac-gurmukhi" , NS_MACGURMUKHITOUNICODE_CID, NS_UNICODETOM
NS_UCONV_REG_UNREG("x-mac-gujarati" , NS_MACGUJARATITOUNICODE_CID, NS_UNICODETOMACGUJARATI_CID)
NS_UCONV_REG_UNREG("x-mac-hebrew" , NS_MACHEBREWTOUNICODE_CID, NS_UNICODETOMACHEBREW_CID)
NS_UCONV_REG_UNREG_ENCODER("Adobe-Symbol-Encoding" , NS_UNICODETOSYMBOL_CID)
NS_UCONV_REG_UNREG_ENCODER("x-zapf-dingbats" , NS_UNICODETOZAPFDINGBATS_CID)
NS_UCONV_REG_UNREG_ENCODER("x-tscii", NS_UNICODETOTSCII_CID)
NS_UCONV_REG_UNREG_ENCODER("x-tamilttf-0", NS_UNICODETOTAMILTTF_CID)
// ucvibm
NS_UCONV_REG_UNREG("IBM850", NS_CP850TOUNICODE_CID, NS_UNICODETOCP850_CID)
NS_UCONV_REG_UNREG("IBM852", NS_CP852TOUNICODE_CID, NS_UNICODETOCP852_CID)
@ -347,8 +338,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToMUTF7)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF16BE)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF16LE)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF16)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToTSCII)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToTamilTTF)
// ucvibm
@ -622,17 +611,12 @@ NS_DEFINE_NAMED_CID(NS_UNICODETOUTF16LE_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOUTF16_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOT61_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOUSERDEFINED_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOSYMBOL_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOZAPFDINGBATS_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOADOBEEURO_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOMACARABIC_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOMACDEVANAGARI_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOMACFARSI_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOMACGURMUKHI_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOMACGUJARATI_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOMACHEBREW_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOTSCII_CID);
NS_DEFINE_NAMED_CID(NS_UNICODETOTAMILTTF_CID);
NS_DEFINE_NAMED_CID(NS_CP850TOUNICODE_CID);
NS_DEFINE_NAMED_CID(NS_CP852TOUNICODE_CID);
NS_DEFINE_NAMED_CID(NS_CP855TOUNICODE_CID);
@ -808,17 +792,12 @@ static const mozilla::Module::CIDEntry kUConvCIDs[] = {
{ &kNS_UNICODETOUTF16_CID, false, nullptr, nsUnicodeToUTF16Constructor },
{ &kNS_UNICODETOT61_CID, false, nullptr, nsUnicodeToT61Constructor },
{ &kNS_UNICODETOUSERDEFINED_CID, false, nullptr, nsUnicodeToUserDefinedConstructor },
{ &kNS_UNICODETOSYMBOL_CID, false, nullptr, nsUnicodeToSymbolConstructor },
{ &kNS_UNICODETOZAPFDINGBATS_CID, false, nullptr, nsUnicodeToZapfDingbatConstructor },
{ &kNS_UNICODETOADOBEEURO_CID, false, nullptr, nsUnicodeToAdobeEuroConstructor },
{ &kNS_UNICODETOMACARABIC_CID, false, nullptr, nsUnicodeToMacArabicConstructor },
{ &kNS_UNICODETOMACDEVANAGARI_CID, false, nullptr, nsUnicodeToMacDevanagariConstructor },
{ &kNS_UNICODETOMACFARSI_CID, false, nullptr, nsUnicodeToMacFarsiConstructor },
{ &kNS_UNICODETOMACGURMUKHI_CID, false, nullptr, nsUnicodeToMacGurmukhiConstructor },
{ &kNS_UNICODETOMACGUJARATI_CID, false, nullptr, nsUnicodeToMacGujaratiConstructor },
{ &kNS_UNICODETOMACHEBREW_CID, false, nullptr, nsUnicodeToMacHebrewConstructor },
{ &kNS_UNICODETOTSCII_CID, false, nullptr, nsUnicodeToTSCIIConstructor },
{ &kNS_UNICODETOTAMILTTF_CID, false, nullptr, nsUnicodeToTamilTTFConstructor },
{ &kNS_CP850TOUNICODE_CID, false, nullptr, nsCP850ToUnicodeConstructor },
{ &kNS_CP852TOUNICODE_CID, false, nullptr, nsCP852ToUnicodeConstructor },
{ &kNS_CP855TOUNICODE_CID, false, nullptr, nsCP855ToUnicodeConstructor },
@ -996,17 +975,12 @@ static const mozilla::Module::ContractIDEntry kUConvContracts[] = {
{ NS_UNICODEENCODER_CONTRACTID_BASE "UTF-16", &kNS_UNICODETOUTF16_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "T.61-8bit", &kNS_UNICODETOT61_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-user-defined", &kNS_UNICODETOUSERDEFINED_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "Adobe-Symbol-Encoding", &kNS_UNICODETOSYMBOL_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-zapf-dingbats", &kNS_UNICODETOZAPFDINGBATS_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-adobe-euro", &kNS_UNICODETOADOBEEURO_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-arabic", &kNS_UNICODETOMACARABIC_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-devanagari", &kNS_UNICODETOMACDEVANAGARI_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-farsi", &kNS_UNICODETOMACFARSI_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-gurmukhi", &kNS_UNICODETOMACGURMUKHI_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-gujarati", &kNS_UNICODETOMACGUJARATI_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-hebrew", &kNS_UNICODETOMACHEBREW_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-tscii", &kNS_UNICODETOTSCII_CID },
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-tamilttf-0", &kNS_UNICODETOTAMILTTF_CID },
{ NS_UNICODEDECODER_CONTRACTID_BASE "IBM850", &kNS_CP850TOUNICODE_CID },
{ NS_UNICODEDECODER_CONTRACTID_BASE "IBM852", &kNS_CP852TOUNICODE_CID },
{ NS_UNICODEDECODER_CONTRACTID_BASE "IBM855", &kNS_CP855TOUNICODE_CID },

View File

@ -73,11 +73,6 @@ var encoderList = [
"x-mac-gujarati",
"x-mac-hebrew",
"Adobe-Symbol-Encoding",
"x-zapf-dingbats",
"x-tscii",
"x-tamilttf-0",
"IBM850",
"IBM852",
"IBM855",

View File

@ -1,47 +0,0 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*========================================================
This is a Generated file. Please don't edit it.
The tool which used to generate this file is called umaptable.
You can find this tool under mozilla/intl/uconv/tools/umaptable.c.
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 2
srcBegin = 20AC
destBegin = 00A4
End of Item 0000
========================================================*/
/* Offset=0x0000 ItemOfList */
0x0001,
/*-------------------------------------------------------*/
/* Offset=0x0001 offsetToFormatArray */
0x0004,
/*-------------------------------------------------------*/
/* Offset=0x0002 offsetToMapCellArray */
0x0005,
/*-------------------------------------------------------*/
/* Offset=0x0003 offsetToMappingTable */
0x0008,
/*-------------------------------------------------------*/
/* Offset=0x0004 Start of Format Array */
/* Total of Format 0 : 0x0000 */
/* Total of Format 1 : 0x0000 */
/* Total of Format 2 : 0x0001 */
/* Total of Format 3 : 0x0000 */
0x0002,
/*-------------------------------------------------------*/
/* Offset=0x0005 Start of MapCell Array */
/* 0000 */ 0x20AC, 0x0000, 0x00A4,
/*-------------------------------------------------------*/
/* Offset=0x0008 Start of MappingTable */
/* End of table Total Length = 0x0008 * 2 */

View File

@ -1,215 +0,0 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*========================================================
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 = 0026
destBegin = 0020
End of Item 0000
Begin of Item 0001
Format 0
srcBegin = 0028
srcEnd = 005F
destBegin = 0028
End of Item 0001
Begin of Item 0002
Format 0
srcBegin = 0061
srcEnd = 007E
destBegin = 0061
End of Item 0002
Begin of Item 0003
Format 2
srcBegin = 0027
destBegin = 00A9
End of Item 0003
Begin of Item 0004
Format 2
srcBegin = 0060
destBegin = 00C1
End of Item 0004
Begin of Item 0005
Format 1
srcBegin = 00A1
srcEnd = 00C6
mappingOffset = 0000
Mapping =
00A1 00A2 00A3 00A8 00A5 FFFD 00A7 00C8
FFFD 00E3 00AB FFFD 002D FFFD 00C5 FFFD
FFFD FFFD FFFD 00C2 FFFD 00B6 00B4 00CB
FFFD 00EB 00BB FFFD FFFD FFFD 00BF FFFD
FFFD FFFD FFFD FFFD FFFD 00E1
End of Item 0005
Begin of Item 0006
Format 1
srcBegin = 00D8
srcEnd = 00E6
mappingOffset = 0026
Mapping =
00E9 FFFD FFFD FFFD FFFD FFFD FFFD 00FB
FFFD FFFD FFFD FFFD FFFD FFFD 00F1
End of Item 0006
Begin of Item 0007
Format 2
srcBegin = 00F8
destBegin = 00F9
End of Item 0007
Begin of Item 0008
Format 2
srcBegin = 0131
destBegin = 00F5
End of Item 0008
Begin of Item 0009
Format 1
srcBegin = 0141
srcEnd = 0142
mappingOffset = 0035
Mapping =
00E8 00F8
End of Item 0009
Begin of Item 000A
Format 1
srcBegin = 0152
srcEnd = 0153
mappingOffset = 0037
Mapping =
00EA 00FA
End of Item 000A
Begin of Item 000B
Format 2
srcBegin = 0192
destBegin = 00A6
End of Item 000B
Begin of Item 000C
Format 1
srcBegin = 02C6
srcEnd = 02C9
mappingOffset = 0039
Mapping =
00C3 00CF FFFD 00C5
End of Item 000C
Begin of Item 000D
Format 1
srcBegin = 02D8
srcEnd = 02DD
mappingOffset = 003D
Mapping =
00C6 00C7 00CA 00CE 00C4 00CD
End of Item 000D
Begin of Item 000E
Format 1
srcBegin = 2013
srcEnd = 2044
mappingOffset = 0043
Mapping =
00B1 00D0 FFFD FFFD FFFD 0060 0027 00B8
FFFD 00AA 00BA 00B9 FFFD 00B2 00B3 00B7
FFFD FFFD FFFD 00BC FFFD FFFD FFFD FFFD
FFFD FFFD FFFD FFFD FFFD 00BD FFFD FFFD
FFFD FFFD FFFD FFFD FFFD FFFD 00AC 00AD
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
FFFD 00A4
End of Item 000E
Begin of Item 000F
Format 1
srcBegin = 2215
srcEnd = 2219
mappingOffset = 0075
Mapping =
00A4 FFFD FFFD FFFD 00B4
End of Item 000F
Begin of Item 0010
Format 1
srcBegin = FB01
srcEnd = FB02
mappingOffset = 007A
Mapping =
00AE 00AF
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 : 0x0003 */
/* Total of Format 1 : 0x0009 */
/* Total of Format 2 : 0x0005 */
/* Total of Format 3 : 0x0000 */
0x2000, 0x2112, 0x2112, 0x1111, 0x0001,
/*-------------------------------------------------------*/
/* Offset=0x0009 Start of MapCell Array */
/* 0000 */ 0x0020, 0x0026, 0x0020,
/* 0001 */ 0x0028, 0x005F, 0x0028,
/* 0002 */ 0x0061, 0x007E, 0x0061,
/* 0003 */ 0x0027, 0x0000, 0x00A9,
/* 0004 */ 0x0060, 0x0000, 0x00C1,
/* 0005 */ 0x00A1, 0x00C6, 0x0000,
/* 0006 */ 0x00D8, 0x00E6, 0x0026,
/* 0007 */ 0x00F8, 0x0000, 0x00F9,
/* 0008 */ 0x0131, 0x0000, 0x00F5,
/* 0009 */ 0x0141, 0x0142, 0x0035,
/* 000A */ 0x0152, 0x0153, 0x0037,
/* 000B */ 0x0192, 0x0000, 0x00A6,
/* 000C */ 0x02C6, 0x02C9, 0x0039,
/* 000D */ 0x02D8, 0x02DD, 0x003D,
/* 000E */ 0x2013, 0x2044, 0x0043,
/* 000F */ 0x2215, 0x2219, 0x0075,
/* 0010 */ 0xFB01, 0xFB02, 0x007A,
/*-------------------------------------------------------*/
/* Offset=0x003C Start of MappingTable */
/* 0000 */ 0x00A1, 0x00A2, 0x00A3, 0x00A8, 0x00A5, 0xFFFD, 0x00A7, 0x00C8,
/* 0008 */ 0xFFFD, 0x00E3, 0x00AB, 0xFFFD, 0x002D, 0xFFFD, 0x00C5, 0xFFFD,
/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00C2, 0xFFFD, 0x00B6, 0x00B4, 0x00CB,
/* 0018 */ 0xFFFD, 0x00EB, 0x00BB, 0xFFFD, 0xFFFD, 0xFFFD, 0x00BF, 0xFFFD,
/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00E1, 0x00E9, 0xFFFD,
/* 0028 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00FB, 0xFFFD, 0xFFFD,
/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00F1, 0x00E8, 0x00F8, 0x00EA,
/* 0038 */ 0x00FA, 0x00C3, 0x00CF, 0xFFFD, 0x00C5, 0x00C6, 0x00C7, 0x00CA,
/* 0040 */ 0x00CE, 0x00C4, 0x00CD, 0x00B1, 0x00D0, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0048 */ 0x0060, 0x0027, 0x00B8, 0xFFFD, 0x00AA, 0x00BA, 0x00B9, 0xFFFD,
/* 0050 */ 0x00B2, 0x00B3, 0x00B7, 0xFFFD, 0xFFFD, 0xFFFD, 0x00BC, 0xFFFD,
/* 0058 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0060 */ 0x00BD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0068 */ 0xFFFD, 0x00AC, 0x00AD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0070 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0x00A4, 0xFFFD, 0xFFFD,
/* 0078 */ 0xFFFD, 0x00B4, 0x00AE, 0x00AF,
/* End of table Total Length = 0x00B8 * 2 */

View File

@ -1,364 +0,0 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*========================================================
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 = 002E
srcEnd = 003F
destBegin = 002E
End of Item 0000
Begin of Item 0001
Format 0
srcBegin = F8EB
srcEnd = F8F4
destBegin = 00E6
End of Item 0001
Begin of Item 0002
Format 0
srcBegin = F8F6
srcEnd = F8FE
destBegin = 00F6
End of Item 0002
Begin of Item 0003
Format 1
srcBegin = 0020
srcEnd = 002C
mappingOffset = 0000
Mapping =
0020 0021 FFFD 0023 FFFD 0025 0026 FFFD
0028 0029 FFFD 002B 002C
End of Item 0003
Begin of Item 0004
Format 1
srcBegin = 005B
srcEnd = 005F
mappingOffset = 000D
Mapping =
005B FFFD 005D FFFD 005F
End of Item 0004
Begin of Item 0005
Format 1
srcBegin = 007B
srcEnd = 007D
mappingOffset = 0012
Mapping =
007B 007C 007D
End of Item 0005
Begin of Item 0006
Format 1
srcBegin = 00A9
srcEnd = 00B5
mappingOffset = 0015
Mapping =
00D3 FFFD FFFD 00D8 FFFD 00D2 FFFD 00B0
00B1 FFFD FFFD FFFD 006D
End of Item 0006
Begin of Item 0007
Format 2
srcBegin = 00D7
destBegin = 00B4
End of Item 0007
Begin of Item 0008
Format 2
srcBegin = 00F7
destBegin = 00B8
End of Item 0008
Begin of Item 0009
Format 2
srcBegin = 0192
destBegin = 00A6
End of Item 0009
Begin of Item 000A
Format 1
srcBegin = 0391
srcEnd = 03D6
mappingOffset = 0022
Mapping =
0041 0042 0047 0044 0045 005A 0048 0051
0049 004B 004C 004D 004E 0058 004F 0050
0052 FFFD 0053 0054 0055 0046 0043 0059
0057 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
0061 0062 0067 0064 0065 007A 0068 0071
0069 006B 006C 006D 006E 0078 006F 0070
0072 0056 0073 0074 0075 0066 0063 0079
0077 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
004A 00A1 FFFD FFFD 006A 0076
End of Item 000A
Begin of Item 000B
Format 1
srcBegin = 2022
srcEnd = 2026
mappingOffset = 0068
Mapping =
00B7 FFFD FFFD FFFD 00BC
End of Item 000B
Begin of Item 000C
Format 1
srcBegin = 2032
srcEnd = 2033
mappingOffset = 006D
Mapping =
00A2 00B2
End of Item 000C
Begin of Item 000D
Format 2
srcBegin = 2044
destBegin = 00A4
End of Item 000D
Begin of Item 000E
Format 1
srcBegin = 2111
srcEnd = 2126
mappingOffset = 006F
Mapping =
00C1 FFFD FFFD FFFD FFFD FFFD FFFD 00C3
FFFD FFFD FFFD 00C2 FFFD FFFD FFFD FFFD
FFFD 00D4 FFFD FFFD FFFD 0057
End of Item 000E
Begin of Item 000F
Format 2
srcBegin = 2135
destBegin = 00C0
End of Item 000F
Begin of Item 0010
Format 1
srcBegin = 2190
srcEnd = 2194
mappingOffset = 0085
Mapping =
00AC 00AD 00AE 00AF 00AB
End of Item 0010
Begin of Item 0011
Format 2
srcBegin = 21B5
destBegin = 00BF
End of Item 0011
Begin of Item 0012
Format 1
srcBegin = 21D0
srcEnd = 21D4
mappingOffset = 008A
Mapping =
00DC 00DD 00DE 00DF 00DB
End of Item 0012
Begin of Item 0013
Format 1
srcBegin = 2200
srcEnd = 2248
mappingOffset = 008F
Mapping =
0022 FFFD 00B6 0024 FFFD 00C6 0044 00D1
00CE 00CF FFFD 0027 FFFD FFFD FFFD 00D5
FFFD 00E5 002D FFFD FFFD 00A4 FFFD 002A
FFFD FFFD 00D6 FFFD FFFD 00B5 00A5 FFFD
00D0 FFFD FFFD FFFD FFFD FFFD FFFD 00D9
00DA 00C7 00C8 00F2 FFFD FFFD FFFD FFFD
FFFD FFFD FFFD FFFD 005C FFFD FFFD FFFD
FFFD FFFD FFFD FFFD 007E FFFD FFFD FFFD
FFFD FFFD FFFD FFFD FFFD 0040 FFFD FFFD
00BB
End of Item 0013
Begin of Item 0014
Format 1
srcBegin = 2260
srcEnd = 2265
mappingOffset = 00D8
Mapping =
00B9 00BA FFFD FFFD 00A3 00B3
End of Item 0014
Begin of Item 0015
Format 1
srcBegin = 2282
srcEnd = 2287
mappingOffset = 00DE
Mapping =
00CC 00C9 00CB FFFD 00CD 00CA
End of Item 0015
Begin of Item 0016
Format 1
srcBegin = 2295
srcEnd = 2297
mappingOffset = 00E4
Mapping =
00C5 FFFD 00C4
End of Item 0016
Begin of Item 0017
Format 2
srcBegin = 22A5
destBegin = 005E
End of Item 0017
Begin of Item 0018
Format 2
srcBegin = 22C5
destBegin = 00D7
End of Item 0018
Begin of Item 0019
Format 1
srcBegin = 2308
srcEnd = 230B
mappingOffset = 00E7
Mapping =
00E9 00F9 00EB 00FB
End of Item 0019
Begin of Item 001A
Format 1
srcBegin = 2320
srcEnd = 232A
mappingOffset = 00EB
Mapping =
00F3 00F5 FFFD FFFD FFFD FFFD FFFD FFFD
FFFD 00E1 00F1
End of Item 001A
Begin of Item 001B
Format 2
srcBegin = 25CA
destBegin = 00E0
End of Item 001B
Begin of Item 001C
Format 1
srcBegin = 2660
srcEnd = 2666
mappingOffset = 00F6
Mapping =
00AA FFFD FFFD 00A7 FFFD 00A9 00A8
End of Item 001C
Begin of Item 001D
Format 1
srcBegin = F8E5
srcEnd = F8F5
mappingOffset = 00FD
Mapping =
0060 00BD 00BE 00E2 00E3 00E4 FFFD FFFD
FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD
00F4
End of Item 001D
========================================================*/
/* Offset=0x0000 ItemOfList */
0x001E,
/*-------------------------------------------------------*/
/* Offset=0x0001 offsetToFormatArray */
0x0004,
/*-------------------------------------------------------*/
/* Offset=0x0002 offsetToMapCellArray */
0x000C,
/*-------------------------------------------------------*/
/* Offset=0x0003 offsetToMappingTable */
0x0066,
/*-------------------------------------------------------*/
/* Offset=0x0004 Start of Format Array */
/* Total of Format 0 : 0x0003 */
/* Total of Format 1 : 0x0012 */
/* Total of Format 2 : 0x0009 */
/* Total of Format 3 : 0x0000 */
0x1000, 0x2111, 0x1122, 0x2121, 0x1121, 0x2111, 0x2112, 0x0011,
/*-------------------------------------------------------*/
/* Offset=0x000C Start of MapCell Array */
/* 0000 */ 0x002E, 0x003F, 0x002E,
/* 0001 */ 0xF8EB, 0xF8F4, 0x00E6,
/* 0002 */ 0xF8F6, 0xF8FE, 0x00F6,
/* 0003 */ 0x0020, 0x002C, 0x0000,
/* 0004 */ 0x005B, 0x005F, 0x000D,
/* 0005 */ 0x007B, 0x007D, 0x0012,
/* 0006 */ 0x00A9, 0x00B5, 0x0015,
/* 0007 */ 0x00D7, 0x0000, 0x00B4,
/* 0008 */ 0x00F7, 0x0000, 0x00B8,
/* 0009 */ 0x0192, 0x0000, 0x00A6,
/* 000A */ 0x0391, 0x03D6, 0x0022,
/* 000B */ 0x2022, 0x2026, 0x0068,
/* 000C */ 0x2032, 0x2033, 0x006D,
/* 000D */ 0x2044, 0x0000, 0x00A4,
/* 000E */ 0x2111, 0x2126, 0x006F,
/* 000F */ 0x2135, 0x0000, 0x00C0,
/* 0010 */ 0x2190, 0x2194, 0x0085,
/* 0011 */ 0x21B5, 0x0000, 0x00BF,
/* 0012 */ 0x21D0, 0x21D4, 0x008A,
/* 0013 */ 0x2200, 0x2248, 0x008F,
/* 0014 */ 0x2260, 0x2265, 0x00D8,
/* 0015 */ 0x2282, 0x2287, 0x00DE,
/* 0016 */ 0x2295, 0x2297, 0x00E4,
/* 0017 */ 0x22A5, 0x0000, 0x005E,
/* 0018 */ 0x22C5, 0x0000, 0x00D7,
/* 0019 */ 0x2308, 0x230B, 0x00E7,
/* 001A */ 0x2320, 0x232A, 0x00EB,
/* 001B */ 0x25CA, 0x0000, 0x00E0,
/* 001C */ 0x2660, 0x2666, 0x00F6,
/* 001D */ 0xF8E5, 0xF8F5, 0x00FD,
/*-------------------------------------------------------*/
/* Offset=0x0066 Start of MappingTable */
/* 0000 */ 0x0020, 0x0021, 0xFFFD, 0x0023, 0xFFFD, 0x0025, 0x0026, 0xFFFD,
/* 0008 */ 0x0028, 0x0029, 0xFFFD, 0x002B, 0x002C, 0x005B, 0xFFFD, 0x005D,
/* 0010 */ 0xFFFD, 0x005F, 0x007B, 0x007C, 0x007D, 0x00D3, 0xFFFD, 0xFFFD,
/* 0018 */ 0x00D8, 0xFFFD, 0x00D2, 0xFFFD, 0x00B0, 0x00B1, 0xFFFD, 0xFFFD,
/* 0020 */ 0xFFFD, 0x006D, 0x0041, 0x0042, 0x0047, 0x0044, 0x0045, 0x005A,
/* 0028 */ 0x0048, 0x0051, 0x0049, 0x004B, 0x004C, 0x004D, 0x004E, 0x0058,
/* 0030 */ 0x004F, 0x0050, 0x0052, 0xFFFD, 0x0053, 0x0054, 0x0055, 0x0046,
/* 0038 */ 0x0043, 0x0059, 0x0057, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0040 */ 0xFFFD, 0xFFFD, 0x0061, 0x0062, 0x0067, 0x0064, 0x0065, 0x007A,
/* 0048 */ 0x0068, 0x0071, 0x0069, 0x006B, 0x006C, 0x006D, 0x006E, 0x0078,
/* 0050 */ 0x006F, 0x0070, 0x0072, 0x0056, 0x0073, 0x0074, 0x0075, 0x0066,
/* 0058 */ 0x0063, 0x0079, 0x0077, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0060 */ 0xFFFD, 0xFFFD, 0x004A, 0x00A1, 0xFFFD, 0xFFFD, 0x006A, 0x0076,
/* 0068 */ 0x00B7, 0xFFFD, 0xFFFD, 0xFFFD, 0x00BC, 0x00A2, 0x00B2, 0x00C1,
/* 0070 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C3, 0xFFFD,
/* 0078 */ 0xFFFD, 0xFFFD, 0x00C2, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0080 */ 0x00D4, 0xFFFD, 0xFFFD, 0xFFFD, 0x0057, 0x00AC, 0x00AD, 0x00AE,
/* 0088 */ 0x00AF, 0x00AB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, 0x00DB, 0x0022,
/* 0090 */ 0xFFFD, 0x00B6, 0x0024, 0xFFFD, 0x00C6, 0x0044, 0x00D1, 0x00CE,
/* 0098 */ 0x00CF, 0xFFFD, 0x0027, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D5, 0xFFFD,
/* 00A0 */ 0x00E5, 0x002D, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0x002A, 0xFFFD,
/* 00A8 */ 0xFFFD, 0x00D6, 0xFFFD, 0xFFFD, 0x00B5, 0x00A5, 0xFFFD, 0x00D0,
/* 00B0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D9, 0x00DA,
/* 00B8 */ 0x00C7, 0x00C8, 0x00F2, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 00C0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x005C, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 00C8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x007E, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 00D0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0040, 0xFFFD, 0xFFFD, 0x00BB,
/* 00D8 */ 0x00B9, 0x00BA, 0xFFFD, 0xFFFD, 0x00A3, 0x00B3, 0x00CC, 0x00C9,
/* 00E0 */ 0x00CB, 0xFFFD, 0x00CD, 0x00CA, 0x00C5, 0xFFFD, 0x00C4, 0x00E9,
/* 00E8 */ 0x00F9, 0x00EB, 0x00FB, 0x00F3, 0x00F5, 0xFFFD, 0xFFFD, 0xFFFD,
/* 00F0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00E1, 0x00F1, 0x00AA, 0xFFFD,
/* 00F8 */ 0xFFFD, 0x00A7, 0xFFFD, 0x00A9, 0x00A8, 0x0060, 0x00BD, 0x00BE,
/* 0100 */ 0x00E2, 0x00E3, 0x00E4, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0108 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00F4,
/* End of table Total Length = 0x0174 * 2 */

View File

@ -1,213 +0,0 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*========================================================
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 = 2460
srcEnd = 2469
destBegin = 00AC
End of Item 0000
Begin of Item 0001
Format 0
srcBegin = 270C
srcEnd = 2727
destBegin = 002C
End of Item 0001
Begin of Item 0002
Format 0
srcBegin = 2729
srcEnd = 274B
destBegin = 0049
End of Item 0002
Begin of Item 0003
Format 0
srcBegin = 2758
srcEnd = 275E
destBegin = 0078
End of Item 0003
Begin of Item 0004
Format 0
srcBegin = 2761
srcEnd = 2767
destBegin = 00A1
End of Item 0004
Begin of Item 0005
Format 0
srcBegin = 2776
srcEnd = 2794
destBegin = 00B6
End of Item 0005
Begin of Item 0006
Format 0
srcBegin = 2798
srcEnd = 27AF
destBegin = 00D8
End of Item 0006
Begin of Item 0007
Format 0
srcBegin = 27B1
srcEnd = 27BE
destBegin = 00F1
End of Item 0007
Begin of Item 0008
Format 0
srcBegin = F8D7
srcEnd = F8E4
destBegin = 0080
End of Item 0008
Begin of Item 0009
Format 2
srcBegin = 0020
destBegin = 0020
End of Item 0009
Begin of Item 000A
Format 1
srcBegin = 2192
srcEnd = 2195
mappingOffset = 0000
Mapping =
00D5 FFFD 00D6 00D7
End of Item 000A
Begin of Item 000B
Format 2
srcBegin = 25A0
destBegin = 006E
End of Item 000B
Begin of Item 000C
Format 1
srcBegin = 25B2
srcEnd = 25D7
mappingOffset = 0004
Mapping =
0073 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
FFFD FFFD 0074 FFFD FFFD FFFD FFFD FFFD
FFFD FFFD FFFD FFFD 0075 FFFD FFFD FFFD
FFFD FFFD FFFD FFFD FFFD 006C FFFD FFFD
FFFD FFFD FFFD FFFD FFFD 0077
End of Item 000C
Begin of Item 000D
Format 1
srcBegin = 2605
srcEnd = 260E
mappingOffset = 002A
Mapping =
0048 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
FFFD 0025
End of Item 000D
Begin of Item 000E
Format 1
srcBegin = 261B
srcEnd = 261E
mappingOffset = 0034
Mapping =
002A FFFD FFFD 002B
End of Item 000E
Begin of Item 000F
Format 1
srcBegin = 2660
srcEnd = 2666
mappingOffset = 0038
Mapping =
00AB FFFD FFFD 00A8 FFFD 00AA 00A9
End of Item 000F
Begin of Item 0010
Format 1
srcBegin = 2701
srcEnd = 2709
mappingOffset = 003F
Mapping =
0021 0022 0023 0024 FFFD 0026 0027 0028
0029
End of Item 0010
Begin of Item 0011
Format 1
srcBegin = 274D
srcEnd = 2756
mappingOffset = 0048
Mapping =
006D FFFD 006F 0070 0071 0072 FFFD FFFD
FFFD 0076
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 : 0x0009 */
/* Total of Format 1 : 0x0007 */
/* Total of Format 2 : 0x0002 */
/* Total of Format 3 : 0x0000 */
0x0000, 0x0000, 0x2120, 0x1111, 0x0011,
/*-------------------------------------------------------*/
/* Offset=0x0009 Start of MapCell Array */
/* 0000 */ 0x2460, 0x2469, 0x00AC,
/* 0001 */ 0x270C, 0x2727, 0x002C,
/* 0002 */ 0x2729, 0x274B, 0x0049,
/* 0003 */ 0x2758, 0x275E, 0x0078,
/* 0004 */ 0x2761, 0x2767, 0x00A1,
/* 0005 */ 0x2776, 0x2794, 0x00B6,
/* 0006 */ 0x2798, 0x27AF, 0x00D8,
/* 0007 */ 0x27B1, 0x27BE, 0x00F1,
/* 0008 */ 0xF8D7, 0xF8E4, 0x0080,
/* 0009 */ 0x0020, 0x0000, 0x0020,
/* 000A */ 0x2192, 0x2195, 0x0000,
/* 000B */ 0x25A0, 0x0000, 0x006E,
/* 000C */ 0x25B2, 0x25D7, 0x0004,
/* 000D */ 0x2605, 0x260E, 0x002A,
/* 000E */ 0x261B, 0x261E, 0x0034,
/* 000F */ 0x2660, 0x2666, 0x0038,
/* 0010 */ 0x2701, 0x2709, 0x003F,
/* 0011 */ 0x274D, 0x2756, 0x0048,
/*-------------------------------------------------------*/
/* Offset=0x003F Start of MappingTable */
/* 0000 */ 0x00D5, 0xFFFD, 0x00D6, 0x00D7, 0x0073, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0074, 0xFFFD,
/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0018 */ 0x0075, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0020 */ 0xFFFD, 0x006C, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0028 */ 0xFFFD, 0x0077, 0x0048, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x0025, 0x002A, 0xFFFD, 0xFFFD, 0x002B,
/* 0038 */ 0x00AB, 0xFFFD, 0xFFFD, 0x00A8, 0xFFFD, 0x00AA, 0x00A9, 0x0021,
/* 0040 */ 0x0022, 0x0023, 0x0024, 0xFFFD, 0x0026, 0x0027, 0x0028, 0x0029,
/* 0048 */ 0x006D, 0xFFFD, 0x006F, 0x0070, 0x0071, 0x0072, 0xFFFD, 0xFFFD,
/* 0050 */ 0xFFFD, 0x0076,
/* End of table Total Length = 0x0091 * 2 */

View File

@ -509,18 +509,6 @@
#define NS_UNICODETOASCII_CID \
{ 0xba6151ba, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
// Class ID for our UnicodeToAscii charset converter
#define NS_UNICODETOSYMBOL_CID \
{ 0x21dd6a02, 0x413c, 0x11d3, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
// Class ID for our UnicodeToAscii charset converter
#define NS_UNICODETOZAPFDINGBATS_CID \
{ 0x21dd6a03, 0x413c, 0x11d3, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
// Class ID for our UnicodeToAscii charset converter
#define NS_UNICODETOADOBEEURO_CID \
{ 0x822cb9ae, 0x6421, 0x4484, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
// {49B38F12-6193-11d3-B3C5-00805F8A6670}
#define NS_UNICODETOUTF16_CID \
{ 0x49b38f12, 0x6193, 0x11d3, {0xb3, 0xc5, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
@ -573,12 +561,4 @@
#define NS_UNICODETOMACGURMUKHI_CID \
{ 0x6803cacf, 0x1e3b, 0x11d5, { 0xa1, 0x45, 0x0, 0x50, 0x4, 0x83, 0x21, 0x42 } }
// {d2800356-c2d7-4e05-a884-79fe566af1cf}
#define NS_UNICODETOTSCII_CID \
{ 0xd2800356, 0xc2d7, 0x4e05, { 0xa8, 0x84, 0x79, 0xfe, 0x56, 0x6a, 0xf1, 0xcf} }
// {a431b276-f77d-4b83-9b37-872cf2fbcc2a}
#define NS_UNICODETOTAMILTTF_CID \
{ 0xa431b276, 0xf77d, 0x4b83, {0x9b, 0x37, 0x87, 0x2c, 0xf2, 0xfb, 0xcc, 0x2a } }
#endif /* nsUCvLatinCID_h___ */

View File

@ -1,26 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsUCConstructors.h"
#include "nsUnicodeToAdobeEuro.h"
//----------------------------------------------------------------------
// Global functions and data [declaration]
nsresult
nsUnicodeToAdobeEuroConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
static const uint16_t g_ufMappingTable[] = {
/* "adobeeuro.uf" was generated like this:
* % echo '0xA4 0x20AC # EURO CURRENCY SIGN' | ./umaptable -uf >adobeeuro.uf
*/
#include "adobeeuro.uf"
};
return CreateTableEncoder(u1ByteCharset,
(uMappingTable*) &g_ufMappingTable, 1,
aOuter, aIID, aResult);
}

View File

@ -1,20 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsUnicodeToAdobeEuro_h___
#define nsUnicodeToAdobeEuro_h___ 1
#include "nsISupports.h"
/**
* A character set converter from Unicode to Adobe Euro
* (see http://bugzilla.mozilla.org/show_bug.cgi?id=158129 for details).
*
*/
nsresult
nsUnicodeToAdobeEuroConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult);
#endif /* !nsUnicodeToAdobeEuro_h___ */

View File

@ -1,23 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsUCConstructors.h"
#include "nsUnicodeToSymbol.h"
//----------------------------------------------------------------------
// Global functions and data [declaration]
nsresult
nsUnicodeToSymbolConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
static const uint16_t g_ufMappingTable[] = {
#include "adobesymbol.uf"
};
return CreateTableEncoder(u1ByteCharset,
(uMappingTable*) &g_ufMappingTable, 1,
aOuter, aIID, aResult);
}

View File

@ -1,19 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsUnicodeToSymbol_h___
#define nsUnicodeToSymbol_h___
#include "nsISupports.h"
/**
* A character set converter from Unicode to Symbol.
*
*/
nsresult
nsUnicodeToSymbolConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult);
#endif /* nsUnicodeToSymbol_h___ */

View File

@ -1,458 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsUnicodeToTSCII.h"
#include "nsMemory.h"
#include "tamil.h"
/*
* TSCII is an 8-bit encoding consisting of:
* 0x00..0x7F: ASCII
* 0x80..0x90, 0x95..0x9F, 0xAB..0xFE:
* Tamil letters and glyphs
* 0xA1..0xA5, 0xAA: Tamil combining letters (after the base character)
* 0xA6..0xA8: Tamil combining letters (before the base character)
* 0x91..0x94: Punctuation
* 0xA9: Symbols
*/
//----------------------------------------------------------------------
// Class nsUnicodeToTSCII [implementation]
NS_IMPL_ISUPPORTS1(nsUnicodeToTSCII, nsIUnicodeEncoder)
/*
* During UCS-4 to TSCII conversion, mState contains
* the last byte (or sometimes the last two bytes) to be output.
* This can be:
* 0x00 Nothing pending.
* 0xB8..0xC9, 0x83..0x86 A consonant.
* 0xEC, 0x8A A consonant with VIRAMA sign (final or joining).
* 0x87, 0xC38A Two consonants combined through a VIRAMA sign.
*/
static const uint8_t UnicharToTSCII[] =
{
0, 0, 0, 0xb7, 0, 0xab, 0xac, 0xfe, // 0x0B80..0x0B87
0xae, 0xaf, 0xb0, 0, 0, 0, 0xb1, 0xb2, // 0x0B88..0x0B8F
0xb3, 0, 0xb4, 0xb5, 0xb6, 0xb8, 0, 0, // 0x0B90..0x0B97
0, 0xb9, 0xba, 0, 0x83, 0, 0xbb, 0xbc, // 0x0B98..0x0B9F
0, 0, 0, 0xbd, 0xbe, 0, 0, 0, // 0x0BA0..0x0BA7
0xbf, 0xc9, 0xc0, 0, 0, 0, 0xc1, 0xc2, // 0x0BA8..0x0BAF
0xc3, 0xc8, 0xc4, 0xc7, 0xc6, 0xc5, 0, 0x84, // 0x0BB0..0x0BB7
0x85, 0x86, 0, 0, 0, 0, 0xa1, 0xa2, // 0x0BB8..0x0BBF
0xa3, 0xa4, 0xa5, 0, 0, 0, 0xa6, 0xa7, // 0x0BC0..0x0BC7
0xa8, 0, 0, 0, 0, 0, 0, 0, // 0x0BC8..0x0BCF
0, 0, 0, 0, 0, 0, 0, 0xaa, // 0x0BD0..0x0BD7
0, 0, 0, 0, 0, 0, 0, 0, // 0x0BD8..0x0BDF
0, 0, 0, 0, 0, 0, 0x80, 0x81, // 0x0BE0..0x0BE7
0x8d, 0x8e, 0x8f, 0x90, 0x95, 0x96, 0x97, 0x98, // 0x0BE8..0x0BEF
0x9d, 0x9e, 0x9f, 0, 0, 0, 0, 0, // 0x0BF0..0x0BF7
0, 0, 0, 0, 0, 0, 0, 0 // 0x0BF8..0x0BFF
};
static const uint8_t consonant_with_u[] =
{
0xcc, 0x99, 0xcd, 0x9a, 0xce, 0xcf, 0xd0, 0xd1, 0xd2,
0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb
};
static const uint8_t consonant_with_uu[] =
{
0xdc, 0x9b, 0xdd, 0x9c, 0xde, 0xdf, 0xe0, 0xe1, 0xe2,
0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb
};
static const uint8_t consonant_with_virama[18] =
{
0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4,
0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd
};
// Modified implementation of Unicode to TSCII converter in glibc by
// Bruno Haible. My modifications are based on Unicode 3.0 chap. 9 and
// the code chart for Tamil.
NS_IMETHODIMP
nsUnicodeToTSCII::Convert(const char16_t * aSrc, int32_t * aSrcLength,
char * aDest, int32_t * aDestLength)
{
const char16_t * src = aSrc;
const char16_t * srcEnd = aSrc + *aSrcLength;
char * dest = aDest;
char * destEnd = dest + *aDestLength;
nsresult rv = NS_OK;
while (src < srcEnd && dest < destEnd) {
char16_t ch = *src;
if (mBuffer) {
// Attempt to combine the last character with this one.
uint32_t last = mBuffer;
// last : consonant
if (IS_TSC_CONSONANT(last)) {
if (ch == UNI_VOWELSIGN_U && IS_TSC_CONSONANT1(last)) {
*dest++ = consonant_with_u[last - TSC_KA];
mBuffer = 0;
++src;
continue;
}
if (ch == UNI_VOWELSIGN_UU && IS_TSC_CONSONANT1(last)) {
*dest++ = consonant_with_uu[last - TSC_KA];
mBuffer = 0;
++src;
continue;
}
// reorder. vowel sign goes to the left of consonant
if (IS_UNI_LEFT_VOWELSIGN(ch)) {
if (dest + 2 > destEnd)
goto error_more_output;
*dest++ = TSC_LEFT_VOWELSIGN(ch);
*dest++ = last;
mBuffer = 0;
++src;
continue;
}
// split and reorder. consonant goes bet. two parts
if (IS_UNI_2PARTS_VOWELSIGN(ch)) {
if (dest + 3 > destEnd)
goto error_more_output;
*dest++ = TSC_LEFT_VOWEL_PART(ch);
*dest++ = last;
*dest++ = TSC_RIGHT_VOWEL_PART(ch);
mBuffer = 0;
++src;
continue;
}
// Virama
if (ch == UNI_VIRAMA) {
// consonant KA can form a conjunct with consonant SSA(SHA).
// buffer dead consonant 'K' for the now.
if (last == TSC_KA) {
mBuffer = TSC_KA_DEAD;
}
// SA can form a conjunct when followed by 'RA'.
// buffer dead consonant 'S' for the now.
else if (last == TSC_SA) {
mBuffer = TSC_SA_DEAD;
}
else {
*dest++ = IS_TSC_CONSONANT1(last) ?
consonant_with_virama[last - TSC_KA] : last + 5;
mBuffer = 0;
}
++src;
continue;
}
// consonant TA forms a ligature with vowel 'I' or 'II'.
if (last == TSC_TA && (ch == UNI_VOWELSIGN_I || ch == UNI_VOWELSIGN_II)) {
*dest++ = ch - (UNI_VOWELSIGN_I - TSC_TI_LIGA);
mBuffer = 0;
++src;
continue;
}
}
else if (last == TSC_KA_DEAD) {
// Kd + SSA = K.SSA
if (ch == UNI_SSA) {
mBuffer = TSC_KSSA;
++src;
continue;
}
}
else if (last == TSC_SA_DEAD) {
// Sd + RA = S.RA. Buffer RA + Sd.
if (ch == UNI_RA) {
mBuffer = 0xc38a;
++src;
continue;
}
}
else if (last == TSC_KSSA) {
if (ch == UNI_VIRAMA) {
*dest++ = (char) TSC_KSSA_DEAD;
mBuffer = 0;
++src;
continue;
}
// vowel splitting/reordering should be done around conjuncts as well.
// reorder. vowel sign goes to the left of consonant
if (IS_UNI_LEFT_VOWELSIGN(ch)) {
if (dest + 2 > destEnd)
goto error_more_output;
*dest++ = TSC_LEFT_VOWELSIGN(ch);
*dest++ = last;
mBuffer = 0;
++src;
continue;
}
// split and reorder. consonant goes bet. two parts
if (IS_UNI_2PARTS_VOWELSIGN(ch)) {
if (dest + 3 > destEnd)
goto error_more_output;
*dest++ = TSC_LEFT_VOWEL_PART(ch);
*dest++ = last;
*dest++ = TSC_RIGHT_VOWEL_PART(ch);
mBuffer = 0;
++src;
continue;
}
}
else {
NS_ASSERTION(last == 0xc38a, "No other value can be buffered");
if (ch == UNI_VOWELSIGN_II) {
*dest++ = (char) TSC_SRII_LIGA;
mBuffer = 0;
++src;
continue;
}
else {
// put back TSC_SA_DEAD and TSC_RA
*dest++ = (char) TSC_SA_DEAD;
mBuffer = TSC_RA;
++src;
continue;
}
}
/* Output the buffered character. */
if (last >> 8) {
if (dest + 2 > destEnd)
goto error_more_output;
*dest++ = last & 0xff;
*dest++ = (last >> 8) & 0xff;
}
else
*dest++ = last & 0xff;
mBuffer = 0;
continue;
}
if (ch < 0x80) // Plain ASCII character.
*dest++ = (char)ch;
else if (IS_UNI_TAMIL(ch)) {
uint8_t t = UnicharToTSCII[ch - UNI_TAMIL_START];
if (t != 0) {
if (IS_TSC_CONSONANT(t))
mBuffer = (uint32_t) t;
else
*dest++ = t;
}
else if (IS_UNI_2PARTS_VOWELSIGN(ch)) {
// actually this is an illegal sequence.
if (dest + 2 > destEnd)
goto error_more_output;
*dest++ = TSC_LEFT_VOWEL_PART(ch);
*dest++ = TSC_RIGHT_VOWEL_PART(ch);
}
else {
*aDestLength = dest - aDest;
return NS_ERROR_UENC_NOMAPPING;
}
}
else if (ch == 0x00A9)
*dest++ = (char)ch;
else if (IS_UNI_SINGLE_QUOTE(ch))
*dest++ = ch - UNI_LEFT_SINGLE_QUOTE + TSC_LEFT_SINGLE_QUOTE;
else if (IS_UNI_DOUBLE_QUOTE(ch))
*dest++ = ch - UNI_LEFT_DOUBLE_QUOTE + TSC_LEFT_DOUBLE_QUOTE;
else {
*aDestLength = dest - aDest;
return NS_ERROR_UENC_NOMAPPING;
}
/* Now that we wrote the output increment the input pointer. */
++src;
}
// flush the buffer
if (mBuffer >> 8) {
// Write out the last character, two bytes.
if (dest + 2 > destEnd)
goto error_more_output;
*dest++ = (mBuffer >> 8) & 0xff;
*dest++ = mBuffer & 0xff;
mBuffer = 0;
}
else if (mBuffer) {
// Write out the last character, a single byte.
if (dest >= destEnd)
goto error_more_output;
*dest++ = mBuffer & 0xff;
mBuffer = 0;
}
*aSrcLength = src - aSrc;
*aDestLength = dest - aDest;
return rv;
error_more_output:
*aSrcLength = src - aSrc;
*aDestLength = dest - aDest;
return NS_OK_UENC_MOREOUTPUT;
}
NS_IMETHODIMP
nsUnicodeToTSCII::Finish(char* aDest, int32_t* aDestLength)
{
if (!mBuffer) {
*aDestLength = 0;
return NS_OK;
}
if (mBuffer >> 8) {
// Write out the last character, two bytes.
if (*aDestLength < 2) {
*aDestLength = 0;
return NS_OK_UENC_MOREOUTPUT;
}
*aDest++ = (mBuffer >> 8) & 0xff;
*aDest++ = mBuffer & 0xff;
mBuffer = 0;
*aDestLength = 2;
}
else {
// Write out the last character, a single byte.
if (*aDestLength < 1) {
*aDestLength = 0;
return NS_OK_UENC_MOREOUTPUT;
}
*aDest++ = mBuffer & 0xff;
mBuffer = 0;
*aDestLength = 1;
}
return NS_OK;
}
//================================================================
NS_IMETHODIMP
nsUnicodeToTSCII::Reset()
{
mBuffer = 0;
return NS_OK;
}
NS_IMETHODIMP
nsUnicodeToTSCII::GetMaxLength(const char16_t * aSrc, int32_t aSrcLength,
int32_t * aDestLength)
{
// Some Tamil letters can be decomposed into 2 glyphs in TSCII.
*aDestLength = aSrcLength * 2;
return NS_OK;
}
NS_IMETHODIMP
nsUnicodeToTSCII::SetOutputErrorBehavior(int32_t aBehavior,
nsIUnicharEncoder *aEncoder,
char16_t aChar)
{
return NS_OK;
}
// same as the mapping of the C1(0x80-0x9f) part of Windows-1252 to Unicode
const static char16_t gTSCIIToTTF[] = {
0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008D, 0x017D, 0x008F,
0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x017E, 0x0178
};
//----------------------------------------------------------------------
// Class nsUnicodeToTamilTTF [implementation]
//
NS_IMPL_ISUPPORTS_INHERITED0(nsUnicodeToTamilTTF, nsUnicodeToTSCII)
NS_IMETHODIMP
nsUnicodeToTamilTTF::Convert(const char16_t * aSrc,
int32_t * aSrcLength, char * aDest,
int32_t * aDestLength)
{
int32_t medLen, destLen;
char *med;
GetMaxLength(aSrc, *aSrcLength, &destLen);
NS_ASSERTION(destLen <= *aDestLength, "insufficient dest. buffer size");
// TSCII converter is a single byte encoder and takes half the space
// taken by TamilTTF encoder.
medLen = destLen / 2;
if (medLen > CHAR_BUFFER_SIZE) {
med = (char *) nsMemory::Alloc(medLen);
if (!med)
return NS_ERROR_OUT_OF_MEMORY;
}
else
med = mStaticBuffer;
nsresult rv = nsUnicodeToTSCII::Convert(aSrc, aSrcLength, med, &medLen);
if (NS_FAILED(rv)) {
if (med != mStaticBuffer)
nsMemory::Free(med);
return rv;
}
int32_t i, j;
// widen 8bit TSCII to pseudo-Unicode font encoding of TSCII-Tamil font
for (i = 0, j = 0; i < medLen; i++) {
// Only C1 part(0x80-0x9f) needs to be mapped as if they're CP1251.
char16_t ucs2 = (med[i] & 0xe0) == 0x80 ?
gTSCIIToTTF[med[i] & 0x7f] : uint8_t(med[i]);
// A lot of TSCII fonts are still based on TSCII 1.6 so that
// they have Tamil vowel 'I' at 0xad instead of 0xfe.
if (ucs2 == 0xfe) ucs2 = 0xad;
aDest[j++] = uint8_t((ucs2 & 0xff00) >> 8);
aDest[j++] = uint8_t(ucs2 & 0x00ff);
}
*aDestLength = j;
if (med != mStaticBuffer)
nsMemory::Free(med);
return NS_OK;
}
NS_IMETHODIMP
nsUnicodeToTamilTTF::GetMaxLength(const char16_t * aSrc, int32_t aSrcLength, int32_t * aDestLength)
{
// Each Tamil character can generate at most two presentation forms,
// but we're 'extending' them to 16bit shorts, which accounts for
// additional factor of 2.
*aDestLength = (aSrcLength + 1) * 4;
return NS_OK;
}
NS_IMETHODIMP
nsUnicodeToTamilTTF::SetOutputErrorBehavior(int32_t aBehavior,
nsIUnicharEncoder *aEncoder,
char16_t aChar)
{
if (aBehavior == kOnError_CallBack && aEncoder == nullptr)
return NS_ERROR_NULL_POINTER;
mErrEncoder = aEncoder;
mErrBehavior = aBehavior;
mErrChar = aChar;
return NS_OK;
}

View File

@ -1,76 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsUnicodeToTSCII_h___
#define nsUnicodeToTSCII_h___
#include "nsCOMPtr.h"
#include "nsISupports.h"
#include "nsIUnicodeEncoder.h"
//----------------------------------------------------------------------
// Class nsUnicodeToTSCII [declaration]
class nsUnicodeToTSCII : public nsIUnicodeEncoder
{
NS_DECL_ISUPPORTS
public:
nsUnicodeToTSCII() { mBuffer = 0; }
virtual ~nsUnicodeToTSCII() {}
NS_IMETHOD Convert(const char16_t * aSrc, int32_t * aSrcLength,
char * aDest, int32_t * aDestLength);
NS_IMETHOD Finish(char * aDest, int32_t * aDestLength);
NS_IMETHOD GetMaxLength(const char16_t * aSrc, int32_t aSrcLength,
int32_t * aDestLength);
NS_IMETHOD Reset();
NS_IMETHOD SetOutputErrorBehavior(int32_t aBehavior,
nsIUnicharEncoder * aEncoder,
char16_t aChar);
private:
uint32_t mBuffer; // buffer for character(s) to be combined with the following
// character. Up to 4 single byte characters can be
// stored.
};
#define CHAR_BUFFER_SIZE 2048
//----------------------------------------------------------------------
// Class nsUnicodeToTamilTTF [declaration]
class nsUnicodeToTamilTTF : public nsUnicodeToTSCII
{
NS_DECL_ISUPPORTS_INHERITED
public:
nsUnicodeToTamilTTF() : nsUnicodeToTSCII() {}
virtual ~nsUnicodeToTamilTTF() {}
NS_IMETHOD Convert (const char16_t * aSrc, int32_t * aSrcLength,
char * aDest, int32_t * aDestLength);
NS_IMETHOD GetMaxLength (const char16_t * aSrc, int32_t aSrcLength,
int32_t * aDestLength);
NS_IMETHOD SetOutputErrorBehavior (int32_t aBehavior,
nsIUnicharEncoder *aEncoder,
char16_t aChar);
private:
char mStaticBuffer[CHAR_BUFFER_SIZE];
int32_t mErrBehavior;
char16_t mErrChar;
nsCOMPtr<nsIUnicharEncoder> mErrEncoder;
};
#endif /* nsUnicodeToTSCII_h___ */

View File

@ -1,24 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsUCConstructors.h"
#include "nsUnicodeToZapfDingbat.h"
//----------------------------------------------------------------------
// Global functions and data [declaration]
nsresult
nsUnicodeToZapfDingbatConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
static const uint16_t g_ufMappingTable[] = {
#include "adobezingbat.uf"
};
return CreateTableEncoder(u1ByteCharset,
(uMappingTable*) &g_ufMappingTable, 1,
aOuter, aIID, aResult);
}

View File

@ -1,19 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsUnicodeToZapfDingbat_h___
#define nsUnicodeToZapfDingbat_h___
#include "nsISupports.h"
/**
* A character set converter from Unicode to ZapfDingbat.
*
*/
nsresult
nsUnicodeToZapfDingbatConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult);
#endif /* nsUnicodeToZapfDingbat_h___ */

View File

@ -1,65 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Definitions to use in TSCII en/decoders.
#define TSC_KA 0xb8
#define TSC_NA 0xc9
// akara varisai
#define IS_TSC_CONSONANT1(c) ((c) >= TSC_KA && (c) <= TSC_NA)
// grantha akara mey varisai
#define TSC_JA 0x83
#define TSC_HA 0x86
#define IS_TSC_CONSONANT2(c) ((c) >= TSC_JA && (c) <= TSC_HA)
// union of two above
#define IS_TSC_CONSONANT(c) (IS_TSC_CONSONANT1(c) || IS_TSC_CONSONANT2(c))
#define TSC_SA 0x85
#define TSC_TA 0xbc
#define TSC_RA 0xc3
#define TSC_KSSA 0x87 // Consonant Conjunct K.SSA : live
#define TSC_KA_DEAD 0xec // KA with virama/pulli
#define TSC_SA_DEAD 0x8a // SA with virama/pulli
#define TSC_KSSA_DEAD 0x8c // Consonant Conjunct K.SSA : dead
#define TSC_TI_LIGA 0xca // Ligature of consonant TA and Vowel sign I
#define TSC_SRII_LIGA 0x82 // Ligature of SA + RA + II
// Two part vowel signs
#define UNI_VOWELSIGN_E 0x0BC6
#define TSC_VOWELSIGN_E 0xa6
#define TSC_LEFT_VOWELSIGN(u) ((u) - UNI_VOWELSIGN_E + TSC_VOWELSIGN_E)
#define IS_UNI_LEFT_VOWELSIGN(u) ((u) >= UNI_VOWELSIGN_E && (u) <= 0x0BC8)
#define IS_UNI_2PARTS_VOWELSIGN(u) ((u) >= 0x0BCA && (u) <= 0x0BCC)
#define UNI_TAMIL_START 0x0B80
#define IS_UNI_TAMIL(u) (UNI_TAMIL_START <= (u) && (u) < UNI_TAMIL_START + 0x80)
#define UNI_VIRAMA 0x0BCD
#define UNI_VOWELSIGN_I 0x0BBF
#define UNI_VOWELSIGN_II 0x0BC0
#define UNI_VOWELSIGN_U 0x0BC1
#define UNI_VOWELSIGN_UU 0x0BC2
#define UNI_SSA 0x0BB7
#define UNI_RA 0x0BB0
// Punctuation marks
#define UNI_LSQ 0x2018
#define UNI_RSQ 0x2019
#define UNI_LDQ 0x201C
#define UNI_RDQ 0x201D
#define UNI_LEFT_SINGLE_QUOTE UNI_LSQ
#define UNI_RIGHT_SINGLE_QUOTE UNI_RSQ
#define UNI_LEFT_DOUBLE_QUOTE UNI_LDQ
#define UNI_RIGHT_DOUBLE_QUOTE UNI_RDQ
#define IS_UNI_SINGLE_QUOTE(u) (UNI_LSQ <= (u) && (u) <= UNI_RSQ)
#define IS_UNI_DOUBLE_QUOTE(u) (UNI_LDQ <= (u) && (u) <= UNI_RDQ)
#define TSC_LEFT_SINGLE_QUOTE 0x91
#define TSC_LEFT_DOUBLE_QUOTE 0x93
#define TSC_LEFT_VOWEL_PART(u) (((u) % 2) ? 0xa7 : 0xa6)
#define TSC_RIGHT_VOWEL_PART(u) (((u) != 0x0BCC) ? 0xa1 : 0xaa)