mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 413613: remove MOZ_EXTRA_X11CONVERTERS and the code it enables, r=smontagu, a=beltzner
This commit is contained in:
parent
bab13a3928
commit
1672bc47c1
@ -493,8 +493,6 @@ MOZ_XFT_LIBS = @MOZ_XFT_LIBS@
|
|||||||
MOZ_PANGO_CFLAGS = @MOZ_PANGO_CFLAGS@
|
MOZ_PANGO_CFLAGS = @MOZ_PANGO_CFLAGS@
|
||||||
MOZ_PANGO_LIBS = @MOZ_PANGO_LIBS@
|
MOZ_PANGO_LIBS = @MOZ_PANGO_LIBS@
|
||||||
|
|
||||||
MOZ_EXTRA_X11CONVERTERS = @MOZ_EXTRA_X11CONVERTERS@
|
|
||||||
|
|
||||||
MOZ_XIE_LIBS = @MOZ_XIE_LIBS@
|
MOZ_XIE_LIBS = @MOZ_XIE_LIBS@
|
||||||
XT_LIBS = @XT_LIBS@
|
XT_LIBS = @XT_LIBS@
|
||||||
|
|
||||||
|
15
configure.in
15
configure.in
@ -4951,21 +4951,6 @@ AC_SUBST(MOZ_ENABLE_DBUS)
|
|||||||
AC_SUBST(MOZ_DBUS_GLIB_CFLAGS)
|
AC_SUBST(MOZ_DBUS_GLIB_CFLAGS)
|
||||||
AC_SUBST(MOZ_DBUS_GLIB_LIBS)
|
AC_SUBST(MOZ_DBUS_GLIB_LIBS)
|
||||||
|
|
||||||
dnl ========================================================
|
|
||||||
dnl = Setting MOZ_EXTRA_X11CONVERTERS turns on additional
|
|
||||||
dnl = converters in intl/uconv that are used only by X11 gfx
|
|
||||||
dnl = implementations. By default, it's undefined so that
|
|
||||||
dnl = those converters are not built on other platforms/toolkits.
|
|
||||||
dnl = (see bug 180851)
|
|
||||||
dnl ========================================================
|
|
||||||
|
|
||||||
if test "$MOZ_ENABLE_GTK2"
|
|
||||||
then
|
|
||||||
AC_DEFINE(MOZ_EXTRA_X11CONVERTERS)
|
|
||||||
MOZ_EXTRA_X11CONVERTERS=1
|
|
||||||
fi
|
|
||||||
AC_SUBST(MOZ_EXTRA_X11CONVERTERS)
|
|
||||||
|
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
dnl = Build Personal Security Manager
|
dnl = Build Personal Security Manager
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
|
@ -202,10 +202,6 @@
|
|||||||
#include "nsUnicodeToMacGurmukhi.h"
|
#include "nsUnicodeToMacGurmukhi.h"
|
||||||
#include "nsUnicodeToMacHebrew.h"
|
#include "nsUnicodeToMacHebrew.h"
|
||||||
#include "nsUnicodeToTSCII.h"
|
#include "nsUnicodeToTSCII.h"
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
#include "nsUnicodeToLangBoxArabic8.h"
|
|
||||||
#include "nsUnicodeToLangBoxArabic16.h"
|
|
||||||
#endif // MOZ_EXTRA_X11CONVERTERS
|
|
||||||
|
|
||||||
// ucvibm
|
// ucvibm
|
||||||
#include "nsUCvIBMCID.h"
|
#include "nsUCvIBMCID.h"
|
||||||
@ -217,9 +213,6 @@
|
|||||||
#include "nsCP862ToUnicode.h"
|
#include "nsCP862ToUnicode.h"
|
||||||
#include "nsCP864ToUnicode.h"
|
#include "nsCP864ToUnicode.h"
|
||||||
#include "nsCP864iToUnicode.h"
|
#include "nsCP864iToUnicode.h"
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
#include "nsCP1046ToUnicode.h"
|
|
||||||
#endif
|
|
||||||
#ifdef XP_OS2
|
#ifdef XP_OS2
|
||||||
#include "nsCP869ToUnicode.h"
|
#include "nsCP869ToUnicode.h"
|
||||||
#include "nsCP1125ToUnicode.h"
|
#include "nsCP1125ToUnicode.h"
|
||||||
@ -232,9 +225,6 @@
|
|||||||
#include "nsUnicodeToCP862.h"
|
#include "nsUnicodeToCP862.h"
|
||||||
#include "nsUnicodeToCP864.h"
|
#include "nsUnicodeToCP864.h"
|
||||||
#include "nsUnicodeToCP864i.h"
|
#include "nsUnicodeToCP864i.h"
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
#include "nsUnicodeToCP1046.h"
|
|
||||||
#endif
|
|
||||||
#ifdef XP_OS2
|
#ifdef XP_OS2
|
||||||
#include "nsUnicodeToCP869.h"
|
#include "nsUnicodeToCP869.h"
|
||||||
#include "nsUnicodeToCP1125.h"
|
#include "nsUnicodeToCP1125.h"
|
||||||
@ -250,34 +240,18 @@
|
|||||||
#include "nsUnicodeToEUCJP.h"
|
#include "nsUnicodeToEUCJP.h"
|
||||||
#include "nsUnicodeToISO2022JP.h"
|
#include "nsUnicodeToISO2022JP.h"
|
||||||
#include "nsUnicodeToJISx0201.h"
|
#include "nsUnicodeToJISx0201.h"
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
#include "nsUnicodeToJISx0208.h"
|
|
||||||
#include "nsUnicodeToJISx0212.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ucvtw2
|
// ucvtw2
|
||||||
#include "nsUCvTW2CID.h"
|
#include "nsUCvTW2CID.h"
|
||||||
#include "nsUCvTW2Dll.h"
|
#include "nsUCvTW2Dll.h"
|
||||||
#include "nsEUCTWToUnicode.h"
|
#include "nsEUCTWToUnicode.h"
|
||||||
#include "nsUnicodeToEUCTW.h"
|
#include "nsUnicodeToEUCTW.h"
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
#include "nsUnicodeToCNS11643p1.h"
|
|
||||||
#include "nsUnicodeToCNS11643p2.h"
|
|
||||||
#include "nsUnicodeToCNS11643p3.h"
|
|
||||||
#include "nsUnicodeToCNS11643p4.h"
|
|
||||||
#include "nsUnicodeToCNS11643p5.h"
|
|
||||||
#include "nsUnicodeToCNS11643p6.h"
|
|
||||||
#include "nsUnicodeToCNS11643p7.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ucvtw
|
// ucvtw
|
||||||
#include "nsUCvTWCID.h"
|
#include "nsUCvTWCID.h"
|
||||||
#include "nsUCvTWDll.h"
|
#include "nsUCvTWDll.h"
|
||||||
#include "nsBIG5ToUnicode.h"
|
#include "nsBIG5ToUnicode.h"
|
||||||
#include "nsUnicodeToBIG5.h"
|
#include "nsUnicodeToBIG5.h"
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
#include "nsUnicodeToBIG5NoAscii.h"
|
|
||||||
#endif
|
|
||||||
#include "nsBIG5HKSCSToUnicode.h"
|
#include "nsBIG5HKSCSToUnicode.h"
|
||||||
#include "nsUnicodeToBIG5HKSCS.h"
|
#include "nsUnicodeToBIG5HKSCS.h"
|
||||||
#include "nsUnicodeToHKSCS.h"
|
#include "nsUnicodeToHKSCS.h"
|
||||||
@ -289,11 +263,6 @@
|
|||||||
#include "nsUnicodeToEUCKR.h"
|
#include "nsUnicodeToEUCKR.h"
|
||||||
#include "nsJohabToUnicode.h"
|
#include "nsJohabToUnicode.h"
|
||||||
#include "nsUnicodeToJohab.h"
|
#include "nsUnicodeToJohab.h"
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
#include "nsUnicodeToKSC5601.h"
|
|
||||||
#include "nsUnicodeToX11Johab.h"
|
|
||||||
#include "nsUnicodeToJohabNoAscii.h"
|
|
||||||
#endif
|
|
||||||
#include "nsCP949ToUnicode.h"
|
#include "nsCP949ToUnicode.h"
|
||||||
#include "nsUnicodeToCP949.h"
|
#include "nsUnicodeToCP949.h"
|
||||||
#include "nsISO2022KRToUnicode.h"
|
#include "nsISO2022KRToUnicode.h"
|
||||||
@ -306,16 +275,10 @@
|
|||||||
#include "nsUnicodeToHZ.h"
|
#include "nsUnicodeToHZ.h"
|
||||||
#include "nsGBKToUnicode.h"
|
#include "nsGBKToUnicode.h"
|
||||||
#include "nsUnicodeToGBK.h"
|
#include "nsUnicodeToGBK.h"
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
#include "nsUnicodeToGBKNoAscii.h"
|
|
||||||
#endif
|
|
||||||
#include "nsCP936ToUnicode.h"
|
#include "nsCP936ToUnicode.h"
|
||||||
#include "nsUnicodeToCP936.h"
|
#include "nsUnicodeToCP936.h"
|
||||||
#include "nsGB2312ToUnicodeV2.h"
|
#include "nsGB2312ToUnicodeV2.h"
|
||||||
#include "nsUnicodeToGB2312V2.h"
|
#include "nsUnicodeToGB2312V2.h"
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
#include "nsUnicodeToGB2312GL.h"
|
|
||||||
#endif
|
|
||||||
#include "nsISO2022CNToUnicode.h"
|
#include "nsISO2022CNToUnicode.h"
|
||||||
#include "nsUnicodeToISO2022CN.h"
|
#include "nsUnicodeToISO2022CN.h"
|
||||||
#include "gbku.h"
|
#include "gbku.h"
|
||||||
@ -396,10 +359,6 @@ 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-zapf-dingbats" , NS_UNICODETOZAPFDINGBATS_CID)
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-tscii", NS_UNICODETOTSCII_CID)
|
NS_UCONV_REG_UNREG_ENCODER("x-tscii", NS_UNICODETOTSCII_CID)
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-tamilttf-0", NS_UNICODETOTAMILTTF_CID)
|
NS_UCONV_REG_UNREG_ENCODER("x-tamilttf-0", NS_UNICODETOTAMILTTF_CID)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-iso-8859-6-8-x" , NS_UNICODETOLANGBOXARABIC_CID)
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-iso-8859-6-16" , NS_UNICODETOLANGBOXARABIC16_CID)
|
|
||||||
#endif // MOZ_EXTRA_X11CONVERTERS
|
|
||||||
|
|
||||||
// ucvibm
|
// ucvibm
|
||||||
NS_UCONV_REG_UNREG("IBM850", NS_CP850TOUNICODE_CID, NS_UNICODETOCP850_CID)
|
NS_UCONV_REG_UNREG("IBM850", NS_CP850TOUNICODE_CID, NS_UNICODETOCP850_CID)
|
||||||
@ -409,9 +368,6 @@ NS_UCONV_REG_UNREG("IBM857", NS_CP857TOUNICODE_CID, NS_UNICODETOCP857_CID)
|
|||||||
NS_UCONV_REG_UNREG("IBM862", NS_CP862TOUNICODE_CID, NS_UNICODETOCP862_CID)
|
NS_UCONV_REG_UNREG("IBM862", NS_CP862TOUNICODE_CID, NS_UNICODETOCP862_CID)
|
||||||
NS_UCONV_REG_UNREG("IBM864", NS_CP864TOUNICODE_CID, NS_UNICODETOCP864_CID)
|
NS_UCONV_REG_UNREG("IBM864", NS_CP864TOUNICODE_CID, NS_UNICODETOCP864_CID)
|
||||||
NS_UCONV_REG_UNREG("IBM864i", NS_CP864ITOUNICODE_CID, NS_UNICODETOCP864I_CID)
|
NS_UCONV_REG_UNREG("IBM864i", NS_CP864ITOUNICODE_CID, NS_UNICODETOCP864I_CID)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_UCONV_REG_UNREG("x-IBM1046", NS_CP1046TOUNICODE_CID, NS_UNICODETOCP1046_CID)
|
|
||||||
#endif
|
|
||||||
#ifdef XP_OS2
|
#ifdef XP_OS2
|
||||||
NS_UCONV_REG_UNREG("IBM869", NS_CP869TOUNICODE_CID, NS_UNICODETOCP869_CID)
|
NS_UCONV_REG_UNREG("IBM869", NS_CP869TOUNICODE_CID, NS_UNICODETOCP869_CID)
|
||||||
NS_UCONV_REG_UNREG("IBM1125", NS_CP1125TOUNICODE_CID, NS_UNICODETOCP1125_CID)
|
NS_UCONV_REG_UNREG("IBM1125", NS_CP1125TOUNICODE_CID, NS_UNICODETOCP1125_CID)
|
||||||
@ -424,31 +380,15 @@ NS_UCONV_REG_UNREG("ISO-2022-JP", NS_ISO2022JPTOUNICODE_CID, NS_UNICODETOISO2022
|
|||||||
NS_UCONV_REG_UNREG("EUC-JP", NS_EUCJPTOUNICODE_CID, NS_UNICODETOEUCJP_CID)
|
NS_UCONV_REG_UNREG("EUC-JP", NS_EUCJPTOUNICODE_CID, NS_UNICODETOEUCJP_CID)
|
||||||
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("jis_0201" , NS_UNICODETOJISX0201_CID)
|
NS_UCONV_REG_UNREG_ENCODER("jis_0201" , NS_UNICODETOJISX0201_CID)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("jis_0208-1983" , NS_UNICODETOJISX0208_CID)
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("jis_0212-1990" , NS_UNICODETOJISX0212_CID)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ucvtw2
|
// ucvtw2
|
||||||
NS_UCONV_REG_UNREG("x-euc-tw", NS_EUCTWTOUNICODE_CID, NS_UNICODETOEUCTW_CID)
|
NS_UCONV_REG_UNREG("x-euc-tw", NS_EUCTWTOUNICODE_CID, NS_UNICODETOEUCTW_CID)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-1" , NS_UNICODETOCNS11643P1_CID)
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-2" , NS_UNICODETOCNS11643P2_CID)
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-3" , NS_UNICODETOCNS11643P3_CID)
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-4" , NS_UNICODETOCNS11643P4_CID)
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-5" , NS_UNICODETOCNS11643P5_CID)
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-6" , NS_UNICODETOCNS11643P6_CID)
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-7" , NS_UNICODETOCNS11643P7_CID)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ucvtw
|
// ucvtw
|
||||||
NS_UCONV_REG_UNREG("Big5", NS_BIG5TOUNICODE_CID, NS_UNICODETOBIG5_CID)
|
NS_UCONV_REG_UNREG("Big5", NS_BIG5TOUNICODE_CID, NS_UNICODETOBIG5_CID)
|
||||||
NS_UCONV_REG_UNREG("Big5-HKSCS", NS_BIG5HKSCSTOUNICODE_CID, NS_UNICODETOBIG5HKSCS_CID)
|
NS_UCONV_REG_UNREG("Big5-HKSCS", NS_BIG5HKSCSTOUNICODE_CID, NS_UNICODETOBIG5HKSCS_CID)
|
||||||
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("hkscs-1" , NS_UNICODETOHKSCS_CID)
|
NS_UCONV_REG_UNREG_ENCODER("hkscs-1" , NS_UNICODETOHKSCS_CID)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-x-big5", NS_UNICODETOBIG5NOASCII_CID)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ucvko
|
// ucvko
|
||||||
NS_UCONV_REG_UNREG("EUC-KR", NS_EUCKRTOUNICODE_CID, NS_UNICODETOEUCKR_CID)
|
NS_UCONV_REG_UNREG("EUC-KR", NS_EUCKRTOUNICODE_CID, NS_UNICODETOEUCKR_CID)
|
||||||
@ -457,28 +397,12 @@ NS_UCONV_REG_UNREG("x-windows-949", NS_CP949TOUNICODE_CID, NS_UNICODETOCP949_CID
|
|||||||
NS_UCONV_REG_UNREG_DECODER("ISO-2022-KR", NS_ISO2022KRTOUNICODE_CID)
|
NS_UCONV_REG_UNREG_DECODER("ISO-2022-KR", NS_ISO2022KRTOUNICODE_CID)
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-koreanjamo-0", NS_UNICODETOJAMOTTF_CID)
|
NS_UCONV_REG_UNREG_ENCODER("x-koreanjamo-0", NS_UNICODETOJAMOTTF_CID)
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("ks_c_5601-1987", NS_UNICODETOKSC5601_CID)
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-x11johab", NS_UNICODETOX11JOHAB_CID)
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-johab-noascii", NS_UNICODETOJOHABNOASCII_CID)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ucvcn
|
// ucvcn
|
||||||
NS_UCONV_REG_UNREG("GB2312", NS_GB2312TOUNICODE_CID, NS_UNICODETOGB2312_CID)
|
NS_UCONV_REG_UNREG("GB2312", NS_GB2312TOUNICODE_CID, NS_UNICODETOGB2312_CID)
|
||||||
NS_UCONV_REG_UNREG("windows-936", NS_CP936TOUNICODE_CID, NS_UNICODETOCP936_CID)
|
NS_UCONV_REG_UNREG("windows-936", NS_CP936TOUNICODE_CID, NS_UNICODETOCP936_CID)
|
||||||
NS_UCONV_REG_UNREG("x-gbk", NS_GBKTOUNICODE_CID, NS_UNICODETOGBK_CID)
|
NS_UCONV_REG_UNREG("x-gbk", NS_GBKTOUNICODE_CID, NS_UNICODETOGBK_CID)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("x-gbk-noascii", NS_UNICODETOGBKNOASCII_CID)
|
|
||||||
#endif
|
|
||||||
NS_UCONV_REG_UNREG("HZ-GB-2312", NS_HZTOUNICODE_CID, NS_UNICODETOHZ_CID)
|
NS_UCONV_REG_UNREG("HZ-GB-2312", NS_HZTOUNICODE_CID, NS_UNICODETOHZ_CID)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("gb_2312-80", NS_UNICODETOGB2312GL_CID)
|
|
||||||
#endif
|
|
||||||
NS_UCONV_REG_UNREG("gb18030", NS_GB18030TOUNICODE_CID, NS_UNICODETOGB18030_CID)
|
NS_UCONV_REG_UNREG("gb18030", NS_GB18030TOUNICODE_CID, NS_UNICODETOGB18030_CID)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("gb18030.2000-0", NS_UNICODETOGB18030Font0_CID)
|
|
||||||
NS_UCONV_REG_UNREG_ENCODER("gb18030.2000-1", NS_UNICODETOGB18030Font1_CID)
|
|
||||||
#endif
|
|
||||||
NS_UCONV_REG_UNREG_DECODER("ISO-2022-CN", NS_ISO2022CNTOUNICODE_CID)
|
NS_UCONV_REG_UNREG_DECODER("ISO-2022-CN", NS_ISO2022CNTOUNICODE_CID)
|
||||||
|
|
||||||
NS_CONVERTER_REGISTRY_END
|
NS_CONVERTER_REGISTRY_END
|
||||||
@ -505,10 +429,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF32BE)
|
|||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF32LE)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF32LE)
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToTSCII)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToTSCII)
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToTamilTTF)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToTamilTTF)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToLangBoxArabic8)
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToLangBoxArabic16)
|
|
||||||
#endif // MOZ_EXTRA_X11CONVERTERS
|
|
||||||
|
|
||||||
// ucvibm
|
// ucvibm
|
||||||
|
|
||||||
@ -521,14 +441,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO2022JP)
|
|||||||
// ucvtw2
|
// ucvtw2
|
||||||
|
|
||||||
// ucvtw
|
// ucvtw
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToBIG5NoAscii)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ucvko
|
// ucvko
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToX11Johab)
|
|
||||||
#endif
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO2022KRToUnicode)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO2022KRToUnicode)
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToJamoTTF)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToJamoTTF)
|
||||||
|
|
||||||
@ -539,20 +453,10 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsCP936ToUnicode)
|
|||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP936)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToCP936)
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGBKToUnicode)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGBKToUnicode)
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGBK)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGBK)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGBKNoAscii)
|
|
||||||
#endif
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHZToUnicode)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHZToUnicode)
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToHZ)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToHZ)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGB2312GL)
|
|
||||||
#endif
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGB18030ToUnicode)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGB18030ToUnicode)
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGB18030)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGB18030)
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGB18030Font0)
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGB18030Font1)
|
|
||||||
#endif
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO2022CNToUnicode)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO2022CNToUnicode)
|
||||||
|
|
||||||
|
|
||||||
@ -1443,18 +1347,6 @@ static const nsModuleComponentInfo components[] =
|
|||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-tamilttf-0",
|
NS_UNICODEENCODER_CONTRACTID_BASE "x-tamilttf-0",
|
||||||
nsUnicodeToTamilTTFConstructor,
|
nsUnicodeToTamilTTFConstructor,
|
||||||
},
|
},
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-iso-8859-6-8-x" , NS_UNICODETOLANGBOXARABIC_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-iso-8859-6-8-x",
|
|
||||||
nsUnicodeToLangBoxArabic8Constructor,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-iso-8859-6-16" , NS_UNICODETOLANGBOXARABIC16_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-iso-8859-6-16",
|
|
||||||
nsUnicodeToLangBoxArabic16Constructor,
|
|
||||||
},
|
|
||||||
#endif // MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// ucvibm
|
// ucvibm
|
||||||
{
|
{
|
||||||
DECODER_NAME_BASE "IBM850" , NS_CP850TOUNICODE_CID,
|
DECODER_NAME_BASE "IBM850" , NS_CP850TOUNICODE_CID,
|
||||||
@ -1491,13 +1383,6 @@ static const nsModuleComponentInfo components[] =
|
|||||||
NS_UNICODEDECODER_CONTRACTID_BASE "IBM864i",
|
NS_UNICODEDECODER_CONTRACTID_BASE "IBM864i",
|
||||||
nsCP864iToUnicodeConstructor ,
|
nsCP864iToUnicodeConstructor ,
|
||||||
},
|
},
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
{
|
|
||||||
DECODER_NAME_BASE "x-IBM1046" , NS_CP1046TOUNICODE_CID,
|
|
||||||
NS_UNICODEDECODER_CONTRACTID_BASE "x-IBM1046",
|
|
||||||
nsCP1046ToUnicodeConstructor ,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
#ifdef XP_OS2
|
#ifdef XP_OS2
|
||||||
{
|
{
|
||||||
DECODER_NAME_BASE "IBM869" , NS_CP869TOUNICODE_CID,
|
DECODER_NAME_BASE "IBM869" , NS_CP869TOUNICODE_CID,
|
||||||
@ -1550,13 +1435,6 @@ static const nsModuleComponentInfo components[] =
|
|||||||
NS_UNICODEENCODER_CONTRACTID_BASE "IBM864i",
|
NS_UNICODEENCODER_CONTRACTID_BASE "IBM864i",
|
||||||
nsUnicodeToCP864iConstructor,
|
nsUnicodeToCP864iConstructor,
|
||||||
},
|
},
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-IBM1046" , NS_UNICODETOCP1046_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-IBM1046",
|
|
||||||
nsUnicodeToCP1046Constructor,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
#ifdef XP_OS2
|
#ifdef XP_OS2
|
||||||
{
|
{
|
||||||
ENCODER_NAME_BASE "IBM869" , NS_UNICODETOCP869_CID,
|
ENCODER_NAME_BASE "IBM869" , NS_UNICODETOCP869_CID,
|
||||||
@ -1610,18 +1488,6 @@ static const nsModuleComponentInfo components[] =
|
|||||||
NS_UNICODEENCODER_CONTRACTID_BASE "jis_0201",
|
NS_UNICODEENCODER_CONTRACTID_BASE "jis_0201",
|
||||||
nsUnicodeToJISx0201Constructor,
|
nsUnicodeToJISx0201Constructor,
|
||||||
},
|
},
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "jis_0208-1983" , NS_UNICODETOJISX0208_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "jis_0208-1983",
|
|
||||||
nsUnicodeToJISx0208Constructor,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "jis_0212-1990" , NS_UNICODETOJISX0212_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "jis_0212-1990",
|
|
||||||
nsUnicodeToJISx0212Constructor,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ucvtw2
|
// ucvtw2
|
||||||
{
|
{
|
||||||
@ -1634,43 +1500,6 @@ static const nsModuleComponentInfo components[] =
|
|||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-euc-tw",
|
NS_UNICODEENCODER_CONTRACTID_BASE "x-euc-tw",
|
||||||
nsUnicodeToEUCTWConstructor,
|
nsUnicodeToEUCTWConstructor,
|
||||||
},
|
},
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-cns-11643-1" , NS_UNICODETOCNS11643P1_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-cns-11643-1",
|
|
||||||
nsUnicodeToCNS11643p1Constructor,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-cns-11643-2" , NS_UNICODETOCNS11643P2_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-cns-11643-2",
|
|
||||||
nsUnicodeToCNS11643p2Constructor,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-cns-11643-3" , NS_UNICODETOCNS11643P3_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-cns-11643-3",
|
|
||||||
nsUnicodeToCNS11643p3Constructor,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-cns-11643-4" , NS_UNICODETOCNS11643P4_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-cns-11643-4",
|
|
||||||
nsUnicodeToCNS11643p4Constructor,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-cns-11643-5" , NS_UNICODETOCNS11643P5_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-cns-11643-5",
|
|
||||||
nsUnicodeToCNS11643p5Constructor,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-cns-11643-6" , NS_UNICODETOCNS11643P6_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-cns-11643-6",
|
|
||||||
nsUnicodeToCNS11643p6Constructor,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-cns-11643-7" , NS_UNICODETOCNS11643P7_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-cns-11643-7",
|
|
||||||
nsUnicodeToCNS11643p7Constructor,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ucvtw
|
// ucvtw
|
||||||
{
|
{
|
||||||
@ -1678,13 +1507,6 @@ static const nsModuleComponentInfo components[] =
|
|||||||
NS_UNICODEENCODER_CONTRACTID_BASE "Big5",
|
NS_UNICODEENCODER_CONTRACTID_BASE "Big5",
|
||||||
nsUnicodeToBIG5Constructor,
|
nsUnicodeToBIG5Constructor,
|
||||||
},
|
},
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-x-big5" , NS_UNICODETOBIG5NOASCII_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-x-big5",
|
|
||||||
nsUnicodeToBIG5NoAsciiConstructor,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
DECODER_NAME_BASE "Big5" , NS_BIG5TOUNICODE_CID,
|
DECODER_NAME_BASE "Big5" , NS_BIG5TOUNICODE_CID,
|
||||||
NS_UNICODEDECODER_CONTRACTID_BASE "Big5",
|
NS_UNICODEDECODER_CONTRACTID_BASE "Big5",
|
||||||
@ -1727,23 +1549,6 @@ static const nsModuleComponentInfo components[] =
|
|||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-johab",
|
NS_UNICODEENCODER_CONTRACTID_BASE "x-johab",
|
||||||
nsUnicodeToJohabConstructor,
|
nsUnicodeToJohabConstructor,
|
||||||
},
|
},
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "ks_c_5601-1987" , NS_UNICODETOKSC5601_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "ks_c_5601-1987",
|
|
||||||
nsUnicodeToKSC5601Constructor,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-x11johab" , NS_UNICODETOX11JOHAB_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-x11johab",
|
|
||||||
nsUnicodeToX11JohabConstructor,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-johab-noascii", NS_UNICODETOJOHABNOASCII_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-johab-noascii",
|
|
||||||
nsUnicodeToJohabNoAsciiConstructor,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
DECODER_NAME_BASE "x-windows-949" , NS_CP949TOUNICODE_CID,
|
DECODER_NAME_BASE "x-windows-949" , NS_CP949TOUNICODE_CID,
|
||||||
NS_UNICODEDECODER_CONTRACTID_BASE "x-windows-949",
|
NS_UNICODEDECODER_CONTRACTID_BASE "x-windows-949",
|
||||||
@ -1795,13 +1600,6 @@ static const nsModuleComponentInfo components[] =
|
|||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-gbk",
|
NS_UNICODEENCODER_CONTRACTID_BASE "x-gbk",
|
||||||
nsUnicodeToGBKConstructor,
|
nsUnicodeToGBKConstructor,
|
||||||
},
|
},
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "x-gbk-noascii" , NS_UNICODETOGBKNOASCII_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-gbk-noascii",
|
|
||||||
nsUnicodeToGBKNoAsciiConstructor,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
DECODER_NAME_BASE "HZ-GB-2312" , NS_HZTOUNICODE_CID,
|
DECODER_NAME_BASE "HZ-GB-2312" , NS_HZTOUNICODE_CID,
|
||||||
NS_UNICODEDECODER_CONTRACTID_BASE "HZ-GB-2312",
|
NS_UNICODEDECODER_CONTRACTID_BASE "HZ-GB-2312",
|
||||||
@ -1812,30 +1610,11 @@ static const nsModuleComponentInfo components[] =
|
|||||||
NS_UNICODEENCODER_CONTRACTID_BASE "HZ-GB-2312",
|
NS_UNICODEENCODER_CONTRACTID_BASE "HZ-GB-2312",
|
||||||
nsUnicodeToHZConstructor,
|
nsUnicodeToHZConstructor,
|
||||||
},
|
},
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "gb_2312-80" , NS_UNICODETOGB2312GL_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "gb_2312-80",
|
|
||||||
nsUnicodeToGB2312GLConstructor,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
DECODER_NAME_BASE "gb18030" , NS_GB18030TOUNICODE_CID,
|
DECODER_NAME_BASE "gb18030" , NS_GB18030TOUNICODE_CID,
|
||||||
NS_UNICODEDECODER_CONTRACTID_BASE "gb18030",
|
NS_UNICODEDECODER_CONTRACTID_BASE "gb18030",
|
||||||
nsGB18030ToUnicodeConstructor ,
|
nsGB18030ToUnicodeConstructor ,
|
||||||
},
|
},
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "gb18030.2000-0" , NS_UNICODETOGB18030Font0_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "gb18030.2000-0",
|
|
||||||
nsUnicodeToGB18030Font0Constructor,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ENCODER_NAME_BASE "gb18030.2000-1" , NS_UNICODETOGB18030Font1_CID,
|
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "gb18030.2000-1",
|
|
||||||
nsUnicodeToGB18030Font1Constructor,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
ENCODER_NAME_BASE "gb18030" , NS_UNICODETOGB18030_CID,
|
ENCODER_NAME_BASE "gb18030" , NS_UNICODETOGB18030_CID,
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "gb18030",
|
NS_UNICODEENCODER_CONTRACTID_BASE "gb18030",
|
||||||
|
@ -67,13 +67,6 @@ CPPSRCS = \
|
|||||||
nsGBKConvUtil.cpp \
|
nsGBKConvUtil.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
CPPSRCS += \
|
|
||||||
nsUnicodeToGBKNoAscii.cpp \
|
|
||||||
nsUnicodeToGB2312GL.cpp \
|
|
||||||
$(NULL)
|
|
||||||
endif
|
|
||||||
|
|
||||||
EXPORTS = nsUCvCnCID.h
|
EXPORTS = nsUCvCnCID.h
|
||||||
|
|
||||||
LOCAL_INCLUDES = -I$(srcdir)/../util
|
LOCAL_INCLUDES = -I$(srcdir)/../util
|
||||||
|
@ -64,25 +64,11 @@
|
|||||||
#define NS_UNICODETOGB2312_CID \
|
#define NS_UNICODETOGB2312_CID \
|
||||||
{ 0x379c2777, 0xec77, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
|
{ 0x379c2777, 0xec77, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// Class ID for our UnicodeToGB2312GL charset converter
|
|
||||||
// {BA615196-1DFA-11d3-B3BF-00805F8A6670}
|
|
||||||
#define NS_UNICODETOGB2312GL_CID \
|
|
||||||
{ 0xba615196, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToGBK charset converter
|
// Class ID for our UnicodeToGBK charset converter
|
||||||
// {BA61519B-1DFA-11d3-B3BF-00805F8A6670}
|
// {BA61519B-1DFA-11d3-B3BF-00805F8A6670}
|
||||||
#define NS_UNICODETOGBK_CID \
|
#define NS_UNICODETOGBK_CID \
|
||||||
{ 0xba61519b, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
{ 0xba61519b, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// Class ID for our UnicodeToGBKNoAscii charset converter
|
|
||||||
// {af0de730-1dd1-11b2-a8a1-b60772efe214}
|
|
||||||
#define NS_UNICODETOGBKNOASCII_CID \
|
|
||||||
{ 0xaf0de730, 0x1dd1, 0x11b2, {0xa8, 0xa1, 0xb6, 0x07, 0x72, 0xef, 0xe2, 0x14}}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToISO2022CN charset converter
|
// Class ID for our UnicodeToISO2022CN charset converter
|
||||||
// {BA61519C-1DFA-11d3-B3BF-00805F8A6670}
|
// {BA61519C-1DFA-11d3-B3BF-00805F8A6670}
|
||||||
#define NS_UNICODETOISO2022CN_CID \
|
#define NS_UNICODETOISO2022CN_CID \
|
||||||
@ -108,18 +94,6 @@
|
|||||||
#define NS_UNICODETOGB18030_CID \
|
#define NS_UNICODETOGB18030_CID \
|
||||||
{ 0xa59da932, 0x4091, 0x11d5, { 0xa1, 0x45, 0x0, 0x50, 0x4, 0x83, 0x21, 0x42 } }
|
{ 0xa59da932, 0x4091, 0x11d5, { 0xa1, 0x45, 0x0, 0x50, 0x4, 0x83, 0x21, 0x42 } }
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// Class ID for our UnicodeToGB18030Font0 charset converter
|
|
||||||
// {A59DA933-4091-11d5-A145-005004832142}
|
|
||||||
#define NS_UNICODETOGB18030Font0_CID \
|
|
||||||
{ 0xa59da933, 0x4091, 0x11d5, { 0xa1, 0x45, 0x0, 0x50, 0x4, 0x83, 0x21, 0x42 } }
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToGB18030Font1 charset converter
|
|
||||||
// {A59DA934-4091-11d5-A145-005004832142}
|
|
||||||
#define NS_UNICODETOGB18030Font1_CID \
|
|
||||||
{ 0xa59da934, 0x4091, 0x11d5, { 0xa1, 0x45, 0x0, 0x50, 0x4, 0x83, 0x21, 0x42 } }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Class ID for our GBKToUnicode charset converter
|
// Class ID for our GBKToUnicode charset converter
|
||||||
// {A59DA935-4091-11d5-A145-005004832142}
|
// {A59DA935-4091-11d5-A145-005004832142}
|
||||||
#define NS_GB18030TOUNICODE_CID \
|
#define NS_GB18030TOUNICODE_CID \
|
||||||
|
@ -1,102 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* Yueheng Xu, yueheng.xu@intel.com
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsICharRepresentable.h"
|
|
||||||
#include "nsUnicodeToGB2312GL.h"
|
|
||||||
#include "nsUCvCnDll.h"
|
|
||||||
|
|
||||||
#include "gbku.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Class nsUnicodeToGB2312GL [implementation]
|
|
||||||
|
|
||||||
nsUnicodeToGB2312GL::nsUnicodeToGB2312GL() :
|
|
||||||
nsEncoderSupport(2)
|
|
||||||
{
|
|
||||||
mUtil.InitToGBKTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToGB2312GL::ConvertNoBuff(const PRUnichar * aSrc,
|
|
||||||
PRInt32 * aSrcLength,
|
|
||||||
char * aDest,
|
|
||||||
PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
PRInt32 iSrcLength = 0;
|
|
||||||
PRInt32 iDestLength = 0;
|
|
||||||
nsresult res = NS_OK;
|
|
||||||
while( iSrcLength < *aSrcLength)
|
|
||||||
{
|
|
||||||
char byte1, byte2;
|
|
||||||
if(mUtil.UnicodeToGBKChar(*aSrc, PR_TRUE, &byte1,&byte2))
|
|
||||||
{
|
|
||||||
if(iDestLength+2 > *aDestLength)
|
|
||||||
{
|
|
||||||
res = NS_OK_UENC_MOREOUTPUT;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
aDest[0]=byte1;
|
|
||||||
aDest[1]=byte2;
|
|
||||||
aDest += 2; // increment 2 bytes
|
|
||||||
iDestLength +=2; // Dest Length in units of chars, each GB char counts as two in string length
|
|
||||||
} else {
|
|
||||||
// cannot map
|
|
||||||
res = NS_ERROR_UENC_NOMAPPING;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
iSrcLength++ ; // Each unicode char just count as one in PRUnichar string;
|
|
||||||
aSrc++;
|
|
||||||
// if dest buffer not big enough, handles it here.
|
|
||||||
if ( (iDestLength >= *aDestLength) && ( iSrcLength < *aSrcLength) )
|
|
||||||
{
|
|
||||||
res = NS_OK_UENC_MOREOUTPUT;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*aDestLength = iDestLength;
|
|
||||||
*aSrcLength = iSrcLength;
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Subclassing of nsTableEncoderSupport class [implementation]
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToGB2312GL::FillInfo(PRUint32 *aInfo)
|
|
||||||
{
|
|
||||||
mUtil.FillGB2312Info(aInfo);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
@ -1,85 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* Yueheng Xu, yueheng.xu@intel.com
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToGB2312GL_h___
|
|
||||||
#define nsUnicodeToGB2312GL_h___
|
|
||||||
|
|
||||||
#include "nsUCSupport.h"
|
|
||||||
#include "gbku.h"
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Class nsUnicodeToGB2312GL [declaration]
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to GB2312GL.
|
|
||||||
*
|
|
||||||
* @created 06/Apr/1999
|
|
||||||
* @author Catalin Rotaru [CATA]
|
|
||||||
* @Modified to use the newer tables in file gbku.h.
|
|
||||||
* Yueheng.xu@intel.com. 3/May/2000
|
|
||||||
*/
|
|
||||||
|
|
||||||
class nsUnicodeToGB2312GL : public nsEncoderSupport
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
nsUnicodeToGB2312GL();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
NS_IMETHOD ConvertNoBuff(const PRUnichar * aSrc,
|
|
||||||
PRInt32 * aSrcLength,
|
|
||||||
char * aDest,
|
|
||||||
PRInt32 * aDestLength);
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
// Subclassing of nsEncoderSupport class [declaration]
|
|
||||||
|
|
||||||
NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, PRInt32 * aSrcLength,
|
|
||||||
char * aDest, PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
return NS_OK;
|
|
||||||
} // just make it not abstract;
|
|
||||||
|
|
||||||
NS_IMETHOD FillInfo(PRUint32 *aInfo);
|
|
||||||
protected:
|
|
||||||
nsGBKConvUtil mUtil;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToGB2312GL_h___ */
|
|
@ -138,180 +138,6 @@ PRBool nsUnicodeToGB18030::EncodeSurrogate(
|
|||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
//-----------------------------------------------------------------------
|
|
||||||
// nsUnicodeToGB18030Font0
|
|
||||||
//-----------------------------------------------------------------------
|
|
||||||
NS_IMETHODIMP nsUnicodeToGB18030Font0::GetMaxLength(const PRUnichar * aSrc,
|
|
||||||
PRInt32 aSrcLength,
|
|
||||||
PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
*aDestLength = 2 * aSrcLength;
|
|
||||||
return NS_OK_UDEC_EXACTLENGTH; // font encoding is only 2 bytes
|
|
||||||
}
|
|
||||||
void nsUnicodeToGB18030Font0::Create4BytesEncoder()
|
|
||||||
{
|
|
||||||
m4BytesEncoder = nsnull;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToGB18030Font0::FillInfo(PRUint32 *aInfo)
|
|
||||||
{
|
|
||||||
nsresult rv = nsUnicodeToGB18030::FillInfo(aInfo); // call the super class
|
|
||||||
if(NS_SUCCEEDED(rv))
|
|
||||||
{
|
|
||||||
// mark the first 128 bits as 0. 4 x 32 bits = 128 bits
|
|
||||||
aInfo[0] = aInfo[1] = aInfo[2] = aInfo[3] = 0;
|
|
||||||
}
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
|
||||||
// nsUnicodeToGB18030Font1
|
|
||||||
//-----------------------------------------------------------------------
|
|
||||||
nsUnicodeToGB18030Font1::nsUnicodeToGB18030Font1()
|
|
||||||
: nsTableEncoderSupport(u2BytesCharset,
|
|
||||||
(uMappingTable*) &g_uf_gb18030_4bytes, 4)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToGB18030Font1::FillInfo(PRUint32 *aInfo)
|
|
||||||
{
|
|
||||||
nsresult res = nsTableEncoderSupport::FillInfo(aInfo);
|
|
||||||
PRUint32 i;
|
|
||||||
|
|
||||||
for(i = (0x0000 >> 5); i<(0x0600 >> 5); i++)
|
|
||||||
aInfo[i] = 0;
|
|
||||||
|
|
||||||
// handle Arabic script
|
|
||||||
for(i = (0x0600 >> 5); i<(0x06e0 >> 5); i++)
|
|
||||||
aInfo[i] = 0;
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x060c);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x061b);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x061f);
|
|
||||||
for(i = 0x0626;i <=0x0628;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x062a);
|
|
||||||
for(i = 0x062c;i <=0x062f;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0x0631;i <=0x0634;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0x0639;i <=0x063a;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0x0640;i <=0x064a;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0x0674;i <=0x0678;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x067e);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x0686);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x0698);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x06a9);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x06ad);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x06af);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x06be);
|
|
||||||
for(i = 0x06c5;i <=0x06c9;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0x06cb;i <=0x06cc;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x06d0);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x06d5);
|
|
||||||
// end of Arabic script
|
|
||||||
|
|
||||||
for(i = (0x06e0 >> 5); i<(0x0f00 >> 5); i++)
|
|
||||||
aInfo[i] = 0;
|
|
||||||
|
|
||||||
// handle Tibetan script
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, 0x0f48);
|
|
||||||
for(i = 0x0f6b;i <0x0f71;i++)
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0x0f8c;i <0x0f90;i++)
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, i);
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, 0x0f98);
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, 0x0fbd);
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, 0x0fcd);
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, 0x0fce);
|
|
||||||
for(i = 0x0fd0;i <0x0fe0;i++)
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, i);
|
|
||||||
// end of Tibetan script
|
|
||||||
|
|
||||||
for(i = (0x0fe0 >> 5); i<(0x1800 >> 5); i++)
|
|
||||||
aInfo[i] = 0;
|
|
||||||
|
|
||||||
// handle Mongolian script
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, 0x180f);
|
|
||||||
for(i = 0x181a;i <0x1820;i++)
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0x1878;i <0x1880;i++)
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0x18aa;i <0x18c0;i++)
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, i);
|
|
||||||
// end of Mongolian script
|
|
||||||
|
|
||||||
for(i = (0x18c0 >> 5); i<(0x3400 >> 5); i++)
|
|
||||||
aInfo[i] = 0;
|
|
||||||
|
|
||||||
// handle Han Ideograph
|
|
||||||
// remove above U+4db5
|
|
||||||
// remove U+4db6 to U+4dbf one by one
|
|
||||||
for(i = 0x4db6;i <0x4dc0;i++)
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, i);
|
|
||||||
// end of Han Ideograph
|
|
||||||
|
|
||||||
// remove U+4dc0 to 0xa000
|
|
||||||
for(i = (0x4dc0 >> 5);i < (0xa000>>5) ; i++)
|
|
||||||
aInfo[i] = 0;
|
|
||||||
|
|
||||||
// handle Yi script
|
|
||||||
for(i = 0xa48d;i <0xa490;i++)
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, i);
|
|
||||||
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, 0xa4a2);
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, 0xa4a3);
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, 0xa4b4);
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, 0xa4c1);
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, 0xa4c5);
|
|
||||||
|
|
||||||
for(i = 0xa4c7;i <0xa4e0;i++)
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, i);
|
|
||||||
// end of Yi script
|
|
||||||
|
|
||||||
for(i = (0xa4e0 >> 5);i < (0xfb00>>5) ; i++)
|
|
||||||
aInfo[i] = 0;
|
|
||||||
|
|
||||||
// handle Arabic script
|
|
||||||
for(i = (0xfb00 >> 5);i < (0xfc00>>5) ; i++)
|
|
||||||
aInfo[i] = 0;
|
|
||||||
for(i = 0xfb56;i <=0xfb59;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0xfb7a;i <=0xfb95;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0xfbaa;i <=0xfbad;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0xfbd3;i <=0xfbff;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
// end of Arabic script
|
|
||||||
|
|
||||||
for(i = (0xfc00 >> 5);i < (0xfe80>>5) ; i++)
|
|
||||||
aInfo[i] = 0;
|
|
||||||
|
|
||||||
// handle Arabic script
|
|
||||||
for(i = (0xfe80 >> 5);i < (0x10000>>5) ; i++)
|
|
||||||
aInfo[i] = 0;
|
|
||||||
for(i = 0xfe89;i <=0xfe98;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0xfe9d;i <=0xfeaa;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0xfead);
|
|
||||||
for(i = 0xfeae;i <=0xfeb8;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i = 0xfec9;i <=0xfef4;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0xfefb);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0xfefc);
|
|
||||||
// end of Arabic script
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Class nsUnicodeToGBK [implementation]
|
// Class nsUnicodeToGBK [implementation]
|
||||||
|
|
||||||
|
@ -104,27 +104,5 @@ protected:
|
|||||||
virtual PRBool EncodeSurrogate(PRUnichar aSurrogateHigh, PRUnichar aSurrogateLow, char* aDest);
|
virtual PRBool EncodeSurrogate(PRUnichar aSurrogateHigh, PRUnichar aSurrogateLow, char* aDest);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
class nsUnicodeToGB18030Font0: public nsUnicodeToGB18030
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
nsUnicodeToGB18030Font0() {}
|
|
||||||
virtual ~nsUnicodeToGB18030Font0() {}
|
|
||||||
protected:
|
|
||||||
virtual void Create4BytesEncoder();
|
|
||||||
NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, PRInt32 aSrcLength,
|
|
||||||
PRInt32 * aDestLength);
|
|
||||||
NS_IMETHOD FillInfo(PRUint32 *aInfo);
|
|
||||||
};
|
|
||||||
class nsUnicodeToGB18030Font1 : public nsTableEncoderSupport
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
nsUnicodeToGB18030Font1();
|
|
||||||
virtual ~nsUnicodeToGB18030Font1() {}
|
|
||||||
protected:
|
|
||||||
NS_IMETHOD FillInfo(PRUint32 *aInfo);
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToGBK_h___ */
|
#endif /* nsUnicodeToGBK_h___ */
|
||||||
|
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 the Initial Developer are Copyright (C) 2001
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to GBK (no ascii).
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @created Jan/24/2001
|
|
||||||
* @author Brian Stell bstell@netscape.com
|
|
||||||
* Revision History
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "nsUnicodeToGBKNoAscii.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Class nsUnicodeToGBK [implementation]
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToGBKNoAscii::FillInfo(PRUint32 *aInfo)
|
|
||||||
{
|
|
||||||
nsresult rv = nsUnicodeToGBK::FillInfo(aInfo); // call the super class
|
|
||||||
if(NS_SUCCEEDED(rv))
|
|
||||||
{
|
|
||||||
// mark the first 128 bits as 0. 4 x 32 bits = 128 bits
|
|
||||||
aInfo[0] = aInfo[1] = aInfo[2] = aInfo[3] = 0;
|
|
||||||
}
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
|||||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to GBK (no ascii).
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @created Jan/24/2001
|
|
||||||
* @author Brian Stell bstell@netscape.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToGBKNoAscii_h___
|
|
||||||
#define nsUnicodeToGBKNoAscii_h___
|
|
||||||
|
|
||||||
#include "nsUnicodeToGBK.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Class nsUnicodeToGBKNoAscii [declaration]
|
|
||||||
|
|
||||||
class nsUnicodeToGBKNoAscii: public nsUnicodeToGBK
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
NS_IMETHOD FillInfo(PRUint32 *aInfo);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToGBKNoAscii_h___ */
|
|
||||||
|
|
@ -69,13 +69,6 @@ CPPSRCS = \
|
|||||||
nsUnicodeToCP864i.cpp \
|
nsUnicodeToCP864i.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
CPPSRCS += \
|
|
||||||
nsCP1046ToUnicode.cpp \
|
|
||||||
nsUnicodeToCP1046.cpp \
|
|
||||||
$(NULL)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(OS_ARCH),OS2)
|
ifeq ($(OS_ARCH),OS2)
|
||||||
CPPSRCS += \
|
CPPSRCS += \
|
||||||
nsCP869ToUnicode.cpp \
|
nsCP869ToUnicode.cpp \
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* IBM Corporation
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
||||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
#include "nsCP1046ToUnicode.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
static const PRUint16 g_utMappingTable[] = {
|
|
||||||
#include "cp1046.ut"
|
|
||||||
};
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Class nsCP1046ToUnicode [implementation]
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsCP1046ToUnicodeConstructor(nsISupports* aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* IBM Corporation
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
||||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsCP1046ToUnicode_h___
|
|
||||||
#define nsCP1046ToUnicode_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
/**
|
|
||||||
* A character set converter from CP1046 to Unicode.
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsCP1046ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* !nsCP1046ToUnicode_h___ */
|
|
@ -126,18 +126,6 @@
|
|||||||
// {2D524FDD-AE74-11d3-ABF7-0004ACEEFA51}
|
// {2D524FDD-AE74-11d3-ABF7-0004ACEEFA51}
|
||||||
#define NS_UNICODETOCP864I_CID \
|
#define NS_UNICODETOCP864I_CID \
|
||||||
{ 0x2d524fdd, 0xae74, 0x11d3, {0xab, 0xf7, 0x0, 0x4, 0xac, 0xee, 0xfa, 0x51}}
|
{ 0x2d524fdd, 0xae74, 0x11d3, {0xab, 0xf7, 0x0, 0x4, 0xac, 0xee, 0xfa, 0x51}}
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// Class ID for our CP1046ToUnicode charset converter
|
|
||||||
// {2D524FDE-AE74-11d3-ABF7-0004ACEEFA51}
|
|
||||||
#define NS_CP1046TOUNICODE_CID \
|
|
||||||
{ 0x2d524fde, 0xae74, 0x11d3, {0xab, 0xf7, 0x0, 0x4, 0xac, 0xee, 0xfa, 0x51}}
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToCP1046 charset converter
|
|
||||||
// {2D524FDF-AE74-11d3-ABF7-0004ACEEFA51}
|
|
||||||
#define NS_UNICODETOCP1046_CID \
|
|
||||||
{ 0x2d524fdf, 0xae74, 0x11d3, {0xab, 0xf7, 0x0, 0x4, 0xac, 0xee, 0xfa, 0x51}}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Class ID for our CP869ToUnicode charset converter
|
// Class ID for our CP869ToUnicode charset converter
|
||||||
// {2D524FE0-AE74-11d3-ABF7-0004ACEEFA51}
|
// {2D524FE0-AE74-11d3-ABF7-0004ACEEFA51}
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* IBM Corporation
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
||||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
#include "nsUnicodeToCP1046.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
static const PRUint16 g_ufMappingTable[] = {
|
|
||||||
#include "cp1046.uf"
|
|
||||||
};
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCP1046Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateTableEncoder(u1ByteCharset,
|
|
||||||
(uMappingTable*) &g_ufMappingTable, 1,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
|||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* IBM Corporation
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
||||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToCP1046_h___
|
|
||||||
#define nsUnicodeToCP1046_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to CP1046.
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCP1046Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* !nsUnicodeToCP1046_h___ */
|
|
@ -62,13 +62,6 @@ CPPSRCS = \
|
|||||||
nsUnicodeToJISx0201.cpp \
|
nsUnicodeToJISx0201.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
CPPSRCS += \
|
|
||||||
nsUnicodeToJISx0208.cpp \
|
|
||||||
nsUnicodeToJISx0212.cpp \
|
|
||||||
$(NULL)
|
|
||||||
endif
|
|
||||||
|
|
||||||
EXPORTS = \
|
EXPORTS = \
|
||||||
nsUCVJACID.h \
|
nsUCVJACID.h \
|
||||||
nsUCVJA2CID.h \
|
nsUCVJA2CID.h \
|
||||||
|
@ -65,17 +65,4 @@
|
|||||||
#define NS_UNICODETOJISX0201_CID \
|
#define NS_UNICODETOJISX0201_CID \
|
||||||
{0xba615191, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
{0xba615191, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// Class ID for our UnicodeToJISx0208 charset converter
|
|
||||||
// {BA615192-1DFA-11d3-B3BF-00805F8A6670}
|
|
||||||
#define NS_UNICODETOJISX0208_CID \
|
|
||||||
{0xba615192, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToJISx0212 charset converter
|
|
||||||
// {BA615193-1DFA-11d3-B3BF-00805F8A6670}
|
|
||||||
#define NS_UNICODETOJISX0212_CID \
|
|
||||||
{0xba615193, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* nsUCVJA2CID_h___ */
|
#endif /* nsUCVJA2CID_h___ */
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToJISx0208.h"
|
|
||||||
#include "nsUCVJADll.h"
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToJISx0208Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateTableEncoder(u2BytesCharset,
|
|
||||||
(uMappingTable*) g_uf0208Mapping,
|
|
||||||
2 /* max length = src * 2 */,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToJISx0208_h___
|
|
||||||
#define nsUnicodeToJISx0208_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to JISx0208.
|
|
||||||
*
|
|
||||||
* @created 17/Feb/1999
|
|
||||||
* @author Catalin Rotaru [CATA]
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToJISx0208Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToJISx0208_h___ */
|
|
@ -1,54 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToJISx0212.h"
|
|
||||||
#include "nsUCVJADll.h"
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToJISx0212Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateTableEncoder(u2BytesCharset,
|
|
||||||
(uMappingTable*) g_uf0212Mapping,
|
|
||||||
2 /* max len = src * 2 */,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToJISx0212_h___
|
|
||||||
#define nsUnicodeToJISx0212_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to JISx0212.
|
|
||||||
*
|
|
||||||
* @created 17/Feb/1999
|
|
||||||
* @author Catalin Rotaru [CATA]
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToJISx0212Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToJISx0212_h___ */
|
|
@ -64,14 +64,6 @@ CPPSRCS = \
|
|||||||
nsUnicodeToJamoTTF.cpp \
|
nsUnicodeToJamoTTF.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
CPPSRCS += \
|
|
||||||
nsUnicodeToKSC5601.cpp \
|
|
||||||
nsUnicodeToX11Johab.cpp \
|
|
||||||
nsUnicodeToJohabNoAscii.cpp \
|
|
||||||
$(NULL)
|
|
||||||
endif
|
|
||||||
|
|
||||||
EXPORTS = nsUCvKOCID.h
|
EXPORTS = nsUCvKOCID.h
|
||||||
|
|
||||||
LOCAL_INCLUDES = -I$(srcdir)/../util
|
LOCAL_INCLUDES = -I$(srcdir)/../util
|
||||||
|
@ -60,13 +60,6 @@
|
|||||||
#define NS_UNICODETOISO2022KR_CID \
|
#define NS_UNICODETOISO2022KR_CID \
|
||||||
{ 0xba6151a0, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
{ 0xba6151a0, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// Class ID for our UnicodeToKSC5601 charset converter
|
|
||||||
// {BA615194-1DFA-11d3-B3BF-00805F8A6670}
|
|
||||||
#define NS_UNICODETOKSC5601_CID \
|
|
||||||
{ 0xba615194, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToCP949 charset converter
|
// Class ID for our UnicodeToCP949 charset converter
|
||||||
#define NS_UNICODETOCP949_CID \
|
#define NS_UNICODETOCP949_CID \
|
||||||
{ 0x9416bfbe, 0x1f93, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
{ 0x9416bfbe, 0x1f93, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
||||||
@ -75,12 +68,6 @@
|
|||||||
#define NS_CP949TOUNICODE_CID \
|
#define NS_CP949TOUNICODE_CID \
|
||||||
{ 0x9416bfbf, 0x1f93, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
{ 0x9416bfbf, 0x1f93, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// Class ID for our UnicodeToX11Johab charset converter
|
|
||||||
#define NS_UNICODETOX11JOHAB_CID \
|
|
||||||
{ 0x21dd6a01, 0x413c, 0x11d3, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToJohab charset converter
|
// Class ID for our UnicodeToJohab charset converter
|
||||||
// {D9B1F97E-CFA0-80b6-FB92-9972E48E3DCC}
|
// {D9B1F97E-CFA0-80b6-FB92-9972E48E3DCC}
|
||||||
#define NS_UNICODETOJOHAB_CID \
|
#define NS_UNICODETOJOHAB_CID \
|
||||||
@ -91,13 +78,6 @@
|
|||||||
#define NS_JOHABTOUNICODE_CID \
|
#define NS_JOHABTOUNICODE_CID \
|
||||||
{ 0xd9b1f97f, 0xcfa0, 0x80b6, {0xfb, 0x92, 0x99, 0x72, 0xe4, 0x8e, 0x3d, 0xcc}}
|
{ 0xd9b1f97f, 0xcfa0, 0x80b6, {0xfb, 0x92, 0x99, 0x72, 0xe4, 0x8e, 0x3d, 0xcc}}
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// Class ID for our UnicodeToJohabNoAscii charset converter
|
|
||||||
// {7090544B-C885-4c52-95F8-3C8F0C2FDE67}
|
|
||||||
#define NS_UNICODETOJOHABNOASCII_CID \
|
|
||||||
{ 0x7090544b, 0xc885, 0x4c52, {0x95, 0xf8, 0x3c, 0x8f, 0xc, 0x2f, 0xde, 0x67}}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToJamoTTF charset converter
|
// Class ID for our UnicodeToJamoTTF charset converter
|
||||||
// {47433d1d-d9a7-4954-994f-f7a05cf87c2e}
|
// {47433d1d-d9a7-4954-994f-f7a05cf87c2e}
|
||||||
#define NS_UNICODETOJAMOTTF_CID \
|
#define NS_UNICODETOJAMOTTF_CID \
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* Jungshik Shin <jshin@mailaps.org>
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToJohabNoAscii.h"
|
|
||||||
#include "nsUCvKODll.h"
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static const PRUint16 *g_JohabMappingTable[3] = {
|
|
||||||
g_HangulNullMapping,
|
|
||||||
g_ufJohabJamoMapping,
|
|
||||||
g_ufKSC5601Mapping
|
|
||||||
};
|
|
||||||
|
|
||||||
static const uScanClassID g_JohabScanClassTable[3] = {
|
|
||||||
uJohabHangulCharset,
|
|
||||||
u2BytesCharset,
|
|
||||||
uJohabSymbolCharset
|
|
||||||
};
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToJohabNoAsciiConstructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateMultiTableEncoder(sizeof(g_JohabScanClassTable) / sizeof(g_JohabScanClassTable[0]),
|
|
||||||
(uScanClassID*) g_JohabScanClassTable,
|
|
||||||
(uMappingTable**) g_JohabMappingTable,
|
|
||||||
2 /* max length = src * 2 */,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
@ -1,51 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToJohabNoAscii_h___
|
|
||||||
#define nsUnicodeToJohabNoAscii_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to Johab Sun Font encoding
|
|
||||||
* ksc5601_1992-3 (Johab without US-ASCII)
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToJohabNoAsciiConstructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToJohabNoAscii_h___ */
|
|
@ -1,55 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* Jungshik Shin <jshin@mailaps.org>
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToKSC5601.h"
|
|
||||||
#include "nsUCvKODll.h"
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToKSC5601Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateTableEncoder(u2BytesCharset,
|
|
||||||
(uMappingTable*) g_ufKSC5601Mapping,
|
|
||||||
2 /* max length = src * 2 */,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToKSC5601_h___
|
|
||||||
#define nsUnicodeToKSC5601_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to KSC5601.
|
|
||||||
*
|
|
||||||
* @created 06/Apr/1999
|
|
||||||
* @author Catalin Rotaru [CATA]
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToKSC5601Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
#endif /* nsUnicodeToKSC5601_h___ */
|
|
@ -1,573 +0,0 @@
|
|||||||
/*
|
|
||||||
* @(#)CharToByteX11Johab.java 1.1 99/08/28
|
|
||||||
*
|
|
||||||
* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 CharToByteX11Johab.java.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Deogtae Kim <dtkim@calab.kaist.ac.kr> (98/05/03)
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 2001
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* Deogtae Kim <dtkim@calab.kaist.ac.kr> (99/08/28)
|
|
||||||
* Jungshik Shin <jshin@pantheon.yale.edu>
|
|
||||||
* Pierre Phaneuf <pp@ludusdesign.com>
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToX11Johab.h"
|
|
||||||
#include "nsUCvKODll.h"
|
|
||||||
|
|
||||||
|
|
||||||
typedef char byte;
|
|
||||||
|
|
||||||
// XPCOM stuff
|
|
||||||
NS_IMPL_ADDREF(nsUnicodeToX11Johab)
|
|
||||||
NS_IMPL_RELEASE(nsUnicodeToX11Johab)
|
|
||||||
nsresult nsUnicodeToX11Johab::QueryInterface(REFNSIID aIID,
|
|
||||||
void** aInstancePtr)
|
|
||||||
{
|
|
||||||
if (NULL == aInstancePtr) {
|
|
||||||
return NS_ERROR_NULL_POINTER;
|
|
||||||
}
|
|
||||||
|
|
||||||
*aInstancePtr = NULL;
|
|
||||||
|
|
||||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
|
||||||
|
|
||||||
if (aIID.Equals(NS_GET_IID(nsIUnicodeEncoder))) {
|
|
||||||
*aInstancePtr = (void*) ((nsIUnicodeEncoder*)this);
|
|
||||||
NS_ADDREF_THIS();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
if (aIID.Equals(NS_GET_IID(nsICharRepresentable))) {
|
|
||||||
*aInstancePtr = (void*) ((nsICharRepresentable*)this);
|
|
||||||
NS_ADDREF_THIS();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
if (aIID.Equals(kISupportsIID)) {
|
|
||||||
*aInstancePtr = (void*) ((nsISupports*)((nsIUnicodeEncoder*)this));
|
|
||||||
NS_ADDREF_THIS();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NS_NOINTERFACE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToX11Johab::SetOutputErrorBehavior(
|
|
||||||
PRInt32 aBehavior,
|
|
||||||
nsIUnicharEncoder * aEncoder, PRUnichar aChar)
|
|
||||||
{
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1 /*
|
|
||||||
// 2 * @(#)CharToByteX11Johab.java 1.0 98/05/03
|
|
||||||
// 3 *
|
|
||||||
// 4 * Purposes:
|
|
||||||
// 5 * 1. Enable displaying all 11,172 Modern hangul syllables with Hanterm
|
|
||||||
// 6 * johab fonts on Unix
|
|
||||||
// 7 * 2. Enable displaying some of Unicode 2.0 ancient hangul syllables
|
|
||||||
// 8 * with Hanterm johab fonts on Unix
|
|
||||||
// 9 * 3. Enable displaying all of Unicode 2.0 ancient hangul syllables with
|
|
||||||
// 10 * possible future extended Hanterm johab fonts on Unix
|
|
||||||
// 11 *
|
|
||||||
// 12 * Installation Instructions:
|
|
||||||
// 13 * 1. Install Hanterm Johab fonts and a proper font property file to Unix syste
|
|
||||||
// 14 m.
|
|
||||||
// 15 * (Confer http://calab.kaist.ac.kr/~dtkim/java/ )
|
|
||||||
// 16 * 2. Make a directory "jdk1.x.x/classes/"
|
|
||||||
// 17 * 3. Compile this class into "jdk1.x.x/classes/"
|
|
||||||
// 18 *
|
|
||||||
// 19 * Author: Deogtae Kim <dtkim@calab.kaist.ac.kr>, 98/05/03
|
|
||||||
// 20 *
|
|
||||||
// 21 * Based on: Hanterm source code adapted by Jungshik Shin <jshin@pantheon.yale.
|
|
||||||
// 22 edu>
|
|
||||||
// 23 */
|
|
||||||
// 24
|
|
||||||
// 25 import sun.io.CharToByteConverter;
|
|
||||||
// 26 import sun.io.MalformedInputException;
|
|
||||||
// 27 import sun.io.UnknownCharacterException;
|
|
||||||
// 28 import sun.io.ConversionBufferFullException;
|
|
||||||
// 29
|
|
||||||
// 30 public class CharToByteX11Johab extends CharToByteConverter
|
|
||||||
// 31 {
|
|
||||||
// 32 int state = START;
|
|
||||||
// 33
|
|
||||||
// 34 public static final int START = 0;
|
|
||||||
// 35 public static final int LEADING_CONSONANT = 1;
|
|
||||||
// 36 public static final int VOWEL = 2;
|
|
||||||
// 37
|
|
||||||
// 38 int l = 0x5f; // leading consonant
|
|
||||||
// 39 int v = 0; // vowel
|
|
||||||
// 40 int t = 0; // trailing consonant
|
|
||||||
|
|
||||||
#define START 1
|
|
||||||
#define LEADING_CONSONANT 1
|
|
||||||
#define VOWEL 2
|
|
||||||
|
|
||||||
// constructor and destroctor
|
|
||||||
|
|
||||||
nsUnicodeToX11Johab::nsUnicodeToX11Johab()
|
|
||||||
{
|
|
||||||
Reset();
|
|
||||||
state = START;
|
|
||||||
l = 0x5f;
|
|
||||||
v = 0;
|
|
||||||
t = 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
nsUnicodeToX11Johab::~nsUnicodeToX11Johab()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// 41
|
|
||||||
// 42 /*
|
|
||||||
// 43 * This method indicates the charset name for this font.
|
|
||||||
// 44 */
|
|
||||||
// 45 public String getCharacterEncoding()
|
|
||||||
// 46 {
|
|
||||||
// 47 return "X11Johab";
|
|
||||||
// 48 }
|
|
||||||
// 49
|
|
||||||
// 50 /*
|
|
||||||
// 51 * This method indicates the range this font covers.
|
|
||||||
// 52 */
|
|
||||||
// 53 public boolean canConvert(char ch)
|
|
||||||
// 54 {
|
|
||||||
// 55 if ( 0xac00 <= ch && ch <= 0xd7a3 // Modern hangul syllables
|
|
||||||
// 56 || 0x1100 <= ch && ch <= 0x1112 // modern leading consonants (19
|
|
||||||
// 57 )
|
|
||||||
// 58 || 0x1113 <= ch && ch <= 0x1159 // ancient leading consonants (7
|
|
||||||
// 59 1)
|
|
||||||
// 60 && lconBase[ch-0x1100] != 0
|
|
||||||
// 61 || ch == 0x115f // leading consonants filler
|
|
||||||
// 62 || 0x1160 <= ch && ch <= 0x1175 // modern vowels (21)
|
|
||||||
// 63 || 0x1176 <= ch && ch <= 0x11a2 // ancient vowels (45)
|
|
||||||
// 64 && vowBase[ch-0x1160] != 0
|
|
||||||
// 65 || 0x11a8 <= ch && ch <= 0x11c2 // modern trailing consonants (2
|
|
||||||
// 66 7)
|
|
||||||
// 67 || 0x11c3 <= ch && ch <= 0x11f9 // ancient trailing consonants (
|
|
||||||
// 68 55)
|
|
||||||
// 69 && tconBase[ch-0x11a7] != 0 )
|
|
||||||
// 70 return true;
|
|
||||||
// 71 return false;
|
|
||||||
// 72 }
|
|
||||||
|
|
||||||
#define canConvert(ch) \
|
|
||||||
(((0xac00 <=(ch))&&((ch)<= 0xd7a3)) /* Modern hangul syllables */\
|
|
||||||
|| ((0x1100 <=(ch))&&((ch)<= 0x1112)) /* modern leading consonants (19) */\
|
|
||||||
|| ((0x1113 <=(ch))&&((ch)<= 0x1159) /* ancient leading consonants (71) */\
|
|
||||||
&& (lconBase[ch-0x1100] != 0)) */\
|
|
||||||
|| ((ch) == 0x115f) /* leading consonants filler */\
|
|
||||||
|| ((0x1160 <=(ch))&&((ch)<= 0x1175)) /* modern vowels (21) */\
|
|
||||||
|| ((0x1176 <=(ch))&&((ch)<= 0x11a2) /* ancient vowels (45) */\
|
|
||||||
&& (vowBase[(ch)-0x1160] != 0 )) */\
|
|
||||||
|| ((0x11a8 <=(ch))&&((ch)<= 0x11c2))/* modern trailing consonants (27) */\
|
|
||||||
|| ((0x11c3 <=(ch))&&((ch)<= 0x11f9) /* ancient trailing consonants (55)*/\
|
|
||||||
&& (tconBase[(ch)-0x11a7] != 0 )))
|
|
||||||
|
|
||||||
// 73
|
|
||||||
// 74 /*
|
|
||||||
// 75 * This method converts the unicode to this font index.
|
|
||||||
// 76 * Note: ConversionBufferFullException is not handled
|
|
||||||
// 77 * since this class is only used for character display.
|
|
||||||
// 78 */
|
|
||||||
// 79 public int convert(char[] input, int inStart, int inEnd,
|
|
||||||
// 80 byte[] output, int outStart, int outEnd)
|
|
||||||
// 81 throws MalformedInputException, UnknownCharacterException
|
|
||||||
// 82 {
|
|
||||||
NS_IMETHODIMP nsUnicodeToX11Johab::Convert(
|
|
||||||
const PRUnichar * input, PRInt32 * aSrcLength,
|
|
||||||
char * output, PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
// 83 charOff = inStart;
|
|
||||||
// 84 byteOff = outStart;
|
|
||||||
charOff = byteOff = 0;
|
|
||||||
/* 85 */
|
|
||||||
/* 86 */ for (; charOff < *aSrcLength; charOff++)
|
|
||||||
/* 87 */ {
|
|
||||||
/* 88 */ PRUnichar ch = input[charOff];
|
|
||||||
/* 89 */ if (0xac00 <= ch && ch <= 0xd7a3)
|
|
||||||
/* 90 */ {
|
|
||||||
/* 91 */ if ( state != START )
|
|
||||||
/* 92 */ composeHangul(output);
|
|
||||||
/* 93 */ ch -= 0xac00;
|
|
||||||
/* 94 */ l = (ch / 588); // 588 = 21*28
|
|
||||||
/* 95 */ v = ( ch / 28 ) % 21 + 1;
|
|
||||||
/* 96 */ t = ch % 28;
|
|
||||||
/* 97 */ composeHangul(output);
|
|
||||||
/* 98 */ } else if (0x1100 <= ch && ch <= 0x115f)
|
|
||||||
/* 99 */ { // leading consonants (19 + 71 + 1)
|
|
||||||
/* 100 */ if ( state != START )
|
|
||||||
/* 101 */ composeHangul(output);
|
|
||||||
/* 102 */ l = ch - 0x1100;
|
|
||||||
/* 103 */ state = LEADING_CONSONANT;
|
|
||||||
/* 104 */ } else if (1160 <= ch && ch <= 0x11a2)
|
|
||||||
/* 105 */ { // vowels (1 + 21 + 45)
|
|
||||||
/* 106 */ v = ch - 0x1160;
|
|
||||||
/* 107 */ state = VOWEL;
|
|
||||||
/* 108 */ } else if (0x11a8 <= ch && ch <= 0x11f9)
|
|
||||||
/* 109 */ { // modern trailing consonants (27)
|
|
||||||
/* 110 */ t = ch - 0x11a7;
|
|
||||||
/* 111 */ composeHangul(output);
|
|
||||||
// 112 } else
|
|
||||||
// 113 {
|
|
||||||
// 114 throw new UnknownCharacterException();
|
|
||||||
/* 115 */ }
|
|
||||||
/* 116 */ }
|
|
||||||
/* 117 */
|
|
||||||
/* 118 */ if ( state != START )
|
|
||||||
/* 119 */ composeHangul( output );
|
|
||||||
/* 120 */
|
|
||||||
// 121 return byteOff - outStart;
|
|
||||||
// 122 }
|
|
||||||
*aDestLength = byteOff;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
// 123
|
|
||||||
// 124 public int flush(byte output[], int i, int j)
|
|
||||||
// 125 throws MalformedInputException
|
|
||||||
// 126 {
|
|
||||||
NS_IMETHODIMP nsUnicodeToX11Johab::Finish(
|
|
||||||
char * output, PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
/* 127 */ byteOff = 0;
|
|
||||||
/* 128 */ PRInt32 len = 0;
|
|
||||||
/* 129 */ if ( state != START )
|
|
||||||
/* 130 */ {
|
|
||||||
/* 131 */ composeHangul( output );
|
|
||||||
/* 132 */ len = byteOff;
|
|
||||||
/* 133 */ }
|
|
||||||
/* 134 */ byteOff = charOff = 0;
|
|
||||||
// 135 return len;
|
|
||||||
*aDestLength = len;
|
|
||||||
// 136 }
|
|
||||||
// 137
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
//================================================================
|
|
||||||
NS_IMETHODIMP nsUnicodeToX11Johab::Reset()
|
|
||||||
// 138 public void reset()
|
|
||||||
/* 139 */ {
|
|
||||||
/* 140 */ byteOff = charOff = 0;
|
|
||||||
/* 141 */ state = START;
|
|
||||||
/* 142 */ l = 0x5f;
|
|
||||||
/* 143 */ v = t = 0;
|
|
||||||
return NS_OK;
|
|
||||||
/* 144 */ }
|
|
||||||
//================================================================
|
|
||||||
// 145
|
|
||||||
// 146 public int getMaxBytesPerChar()
|
|
||||||
// 147 {
|
|
||||||
// 148 return 6;
|
|
||||||
// 149 }
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToX11Johab::GetMaxLength(
|
|
||||||
const PRUnichar * aSrc, PRInt32 aSrcLength,
|
|
||||||
PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
*aDestLength = (aSrcLength + 1) * 6;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
//================================================================
|
|
||||||
|
|
||||||
// 150
|
|
||||||
// 151 // The base font index for leading consonants
|
|
||||||
// 152
|
|
||||||
// 153 static final short[] lconBase = {
|
|
||||||
static const PRUint16 lconBase[] = {
|
|
||||||
/* 154 */ // modern leading consonants (19)
|
|
||||||
/* 155 */ 1, 11, 21, 31, 41, 51,
|
|
||||||
/* 156 */ 61, 71, 81, 91, 101, 111,
|
|
||||||
/* 157 */ 121, 131, 141, 151, 161, 171,
|
|
||||||
/* 158 */ 181,
|
|
||||||
/* 159 */
|
|
||||||
/* 160 */ // ancient leading consonants (71 + reserved 5 + filler 1)
|
|
||||||
/* 161 */ 0, 0, 0, 0, 0, 0, // \u1113 ~ :
|
|
||||||
/* 162 */ 0, 0, 0, 0, 0, 201, // \u1119 ~ :
|
|
||||||
/* 163 */ 0, 221, 251, 0, 0, 0, // \u111f ~ :
|
|
||||||
/* 164 */ 0, 0, 281, 0, 0, 0, // \u1125 ~ :
|
|
||||||
/* 165 */ 191, 0, 211, 0, 231, 0, // \u112b ~ :
|
|
||||||
/* 166 */ 0, 241, 0, 0, 0, 291, // \u1131 ~ :
|
|
||||||
/* 167 */ 0, 0, 0, 0, 0, 0, // \u1137 ~ :
|
|
||||||
/* 168 */ 0, 0, 0, 261, 0, 0, // \u113d ~ :
|
|
||||||
/* 169 */ 0, 0, 0, 0, 0, 0, // \u1143 ~ :
|
|
||||||
/* 170 */ 0, 0, 0, 271, 0, 0, // \u1149 ~ :
|
|
||||||
/* 171 */ 0, 0, 0, 0, 0, 0, // \u114f ~ :
|
|
||||||
/* 172 */ 0, 0, 0, 0, 301, // \u1155 ~ :
|
|
||||||
/* 173 */ 0, 0, 0, 0, 0, // \u115a ~ : reserved
|
|
||||||
/* 174 */ 0, // \u115f : leading consonant filler
|
|
||||||
/* 175 */ };
|
|
||||||
//================================================================
|
|
||||||
// 176
|
|
||||||
// 177 // The base font index for vowels
|
|
||||||
// 178
|
|
||||||
// 179 static final short[] vowBase = {
|
|
||||||
static const PRUint16 vowBase[] = {
|
|
||||||
/* 180 */ // modern vowels (filler + 21)
|
|
||||||
/* 181 */ 0,311,314,317,320,323, // (Fill), A, AE, YA, YAE, EO
|
|
||||||
/* 182 */ 326,329,332,335,339,343, // E, YEO, YE, O, WA, WAE
|
|
||||||
/* 183 */ 347,351,355,358,361,364, // OI, YO, U, WEO, WE, WI
|
|
||||||
/* 184 */ 367,370,374,378, // YU, EU, UI, I
|
|
||||||
/* 185 */
|
|
||||||
/* 186 */ // ancient vowels (45)
|
|
||||||
/* 187 */ 0, 0, 0, 0, 0, 0, // \u1176 ~ : A-O, A-U, YA-O, YA-YO, EO-O, EO- U
|
|
||||||
/* 189 */ 0, 0, 0, 0, 0, 0, // \u117c ~ : EO-EU, YEO-O, YEO-U, O-EO, O-E, O-YE
|
|
||||||
/* 191 */ 0, 0, 381, 384, 0, 0, // \u1182 ~ : O-O, O-U, YO-YA, YO-YAE, YO-YEO, YO-O
|
|
||||||
/* 193 */ 387, 0, 0, 0, 0, 0, // \u1188 ~ : YO-I, U-A, U-AE, U-EO-EU, U-YE, U-U
|
|
||||||
/* 195 */ 0, 0, 0, 390, 393, 0, // \u118e ~ : YU-A, YU-EO, YU-E, YU-YEO, YU-YE , YU-U
|
|
||||||
/* 197 */ 396, 0, 0, 0, 0, 0, // \u1194 ~ : YU-I, EU-U, EU-EU, YI-U, I-A, I- YA
|
|
||||||
/* 199 */ 0, 0, 0, 0, 399, 0, // \u119a ~ : I-O, I-U, I-EU, I-ARAEA, ARAEA, ARAEA-EO
|
|
||||||
/* 201 */ 0, 402, 0 // \u11a0 ~ : ARAEA-U, ARAEA-I,SSANGARAEA
|
|
||||||
/* 202 */ };
|
|
||||||
//================================================================
|
|
||||||
// 203
|
|
||||||
// 204 // The base font index for trailing consonants
|
|
||||||
// 205
|
|
||||||
// 206 static final short[] tconBase = {
|
|
||||||
static const PRUint16 tconBase[] = {
|
|
||||||
// 207 // modern trailing consonants (filler + 27)
|
|
||||||
/* 208 */ 0,
|
|
||||||
/* 209 */ 405, 409, 413, 417, 421,
|
|
||||||
/* 210 */ 425, 429, 433, 437, 441,
|
|
||||||
/* 211 */ 445, 459, 453, 457, 461,
|
|
||||||
/* 212 */ 465, 469, 473, 477, 481,
|
|
||||||
/* 213 */ 485, 489, 493, 497, 501,
|
|
||||||
/* 214 */ 505, 509,
|
|
||||||
// 215
|
|
||||||
// 216 // ancient trailing consonants (55)
|
|
||||||
/* 217 */ 0, 0, 0, 0, 0, 0, // \u11c3 ~ :
|
|
||||||
/* 218 */ 0, 0, 0, 0, 0, 0, // \u11c9 ~ :
|
|
||||||
/* 219 */ 0, 0, 0, 0, 0, 0, // \u11cf ~ :
|
|
||||||
/* 220 */ 0, 0, 0, 0, 513, 517, // \u11d5 ~ :
|
|
||||||
/* 221 */ 0, 0, 0, 0, 0, 0, // \u11db ~ :
|
|
||||||
/* 222 */ 0, 0, 0, 0, 0, 0, // \u11e1 ~ :
|
|
||||||
/* 223 */ 0, 0, 0, 0, 0, 0, // \u11e7 ~ :
|
|
||||||
/* 224 */ 0, 0, 0, 525, 0, 0, // \u11ed ~ :
|
|
||||||
/* 225 */ 0, 0, 0, 0, 0, 0, // \u11f3 ~ :
|
|
||||||
/* 226 */ 521 // \u11f9:
|
|
||||||
/* 227 */ };
|
|
||||||
//================================================================
|
|
||||||
// 228
|
|
||||||
// 229 // The mapping from vowels to leading consonant type
|
|
||||||
// 230 // in absence of trailing consonant
|
|
||||||
// 231
|
|
||||||
// 232 static final short[] lconMap1 = {
|
|
||||||
static const PRUint8 lconMap1[] = {
|
|
||||||
/* 233 */ 0,0,0,0,0,0, // (Fill), A, AE, YA, YAE, EO
|
|
||||||
/* 234 */ 0,0,0,1,3,3, // E, YEO, YE, O, WA, WAE
|
|
||||||
/* 235 */ 3,1,2,4,4,4, // OI, YO, U, WEO, WE, WI
|
|
||||||
/* 236 */ 2,1,3,0, // YU, EU, UI, I
|
|
||||||
// 237
|
|
||||||
// 238 // ancient vowels (45)
|
|
||||||
/* 239 */ 3, 4, 3, 3, 3, 4, // \u1176 ~ : A-O, A-U, YA-O, YA-YO, EO-O, EO-U
|
|
||||||
/* 240 */ 4, 3, 4, 3, 3, 3, // \u117c ~ : EO-EU, YEO-O, YEO-U, O-EO, O-E, O-YE
|
|
||||||
/* 241 */ 1, 1, 3, 3, 3, 1, // \u1182 ~ : O-O, O-U, YO-YA, YO-YAE, YO-YEO, YO-O
|
|
||||||
/* 242 */ 3, 4, 4, 4, 4, 2, // \u1188 ~ : YO-I, U-A, U-AE, U-EO-EU, U-YE, U-U
|
|
||||||
/* 243 */ 3, 3, 3, 3, 3, 2, // \u118e ~ : YU-A, YU-EO, YU-E, YU-YEO, YU-YE, YU-U
|
|
||||||
/* 245 */ 4, 2, 2, 4, 0, 0, // \u1194 ~ : YU-I, EU-U, EU-EU, YI-U, I-A, I-YA
|
|
||||||
/* 246 */ 3, 4, 3, 0, 1, 3, // \u119a ~ : I-O, I-U, I-EU, I-ARAEA, ARAEA, ARAEA-EO
|
|
||||||
/* 248 */ 2, 3, 1 // \u11a0 ~ : ARAEA-U, ARAEA-I, SSANGARAEA
|
|
||||||
/* 249 */ };
|
|
||||||
//================================================================
|
|
||||||
// 250
|
|
||||||
// 251 // The mapping from vowels to leading consonant type
|
|
||||||
// 252 // in presence of trailing consonant
|
|
||||||
// 253
|
|
||||||
static const PRUint8 lconMap2[] = {
|
|
||||||
// 254 static final short[] lconMap2 = {
|
|
||||||
/* 255 */ 5,5,5,5,5,5, // (Fill), A, AE, YA, YAE, EO
|
|
||||||
/* 256 */ 5,5,5,6,8,8, // E, YEO, YE, O, WA, WAE
|
|
||||||
/* 257 */ 8,6,7,9,9,9, // OI, YO, U, WEO, WE, WI
|
|
||||||
/* 258 */ 7,6,8,5, // YU, EU, UI, I
|
|
||||||
// 259
|
|
||||||
// 260 // ancient vowels (45)
|
|
||||||
/* 261 */ 8, 9, 8, 8, 8, 9, // \u1176 ~ : A-O, A-U, YA-O, YA-YO, EO-O, EO-U
|
|
||||||
/* 262 */ 9, 8, 9, 8, 8, 8, // \u117c ~ : EO-EU, YEO-O, YEO-U, O-EO, O-E, O-YE
|
|
||||||
/* 263 */ 6, 6, 8, 8, 8, 6, // \u1182 ~ : O-O, O-U, YO-YA, YO-YAE, YO-YEO, YO-O
|
|
||||||
/* 264 */ 8, 9, 9, 9, 9, 7, // \u1188 ~ : YO-I, U-A, U-AE, U-EO-EU, U-YE, U-U
|
|
||||||
/* 265 */ 8, 8, 8, 8, 8, 7, // \u118e ~ : YU-A, YU-EO, YU-E, YU-YEO, YU-YE, Y
|
|
||||||
/* 267 */ 9, 7, 7, 9, 5, 5, // \u1194 ~ : YU-I, EU-U, EU-EU, YI-U, I-A, I-YA
|
|
||||||
/* 268 */ 8, 9, 8, 5, 6, 8, // \u119a ~ : I-O, I-U, I-EU, I-ARAEA, ARAEA, ARAEA-EO
|
|
||||||
/* 270 */ 7, 8, 6 // \u11a0 ~ : ARAEA-U, ARAEA-I, SSANGARAEA
|
|
||||||
/* 271 */ };
|
|
||||||
//================================================================
|
|
||||||
// 272
|
|
||||||
// 273 // vowel type ; 1 = o and its alikes, 0 = others
|
|
||||||
// 274 static final short[] vowType = {
|
|
||||||
static const PRUint8 vowType[] = {
|
|
||||||
/* 275 */ 0,0,0,0,0,0,
|
|
||||||
/* 276 */ 0,0,0,1,1,1,
|
|
||||||
/* 277 */ 1,1,0,0,0,0,
|
|
||||||
/* 278 */ 0,1,1,0,
|
|
||||||
// 279
|
|
||||||
// 280 // ancient vowels (45)
|
|
||||||
/* 281 */ 1, 0, 1, 1, 1, 0, // \u1176 ~ : A-O, A-U, YA-O, YA-YO, EO-O, EO-U
|
|
||||||
/* 282 */ 0, 1, 0, 1, 1, 1, // \u117c ~ : EO-EU, YEO-O, YEO-U, O-EO, O-E, O-YE
|
|
||||||
/* 283 */ 1, 1, 0, 0, 0, 0, // \u1182 ~ : O-O, O-U, YO-YA, YO-YAE, YO-YEO, YO-O
|
|
||||||
/* 284 */ 0, 0, 0, 0, 0, 0, // \u1188 ~ : YO-I, U-A, U-AE, U-EO-EU, U-YE, U-U
|
|
||||||
/* 285 */ 0, 0, 0, 0, 0, 0, // \u118e ~ : YU-A, YU-EO, YU-E, YU-YEO, YU-YE, YU-U
|
|
||||||
/* 287 */ 0, 0, 0, 0, 0, 0, // \u1194 ~ : YU-I, EU-U, EU-EU, YI-U, I-A, I-YA
|
|
||||||
/* 288 */ 0, 0, 0, 0, 0, 0, // \u119a ~ : I-O, I-U, I-EU, I-ARAEA, ARAEA, ARAEA-EO
|
|
||||||
/* 290 */ 0, 0, 0 // \u11a0 ~ : ARAEA-U, ARAEA-I, SSANGARAEA
|
|
||||||
/* 291 */ };
|
|
||||||
//================================================================
|
|
||||||
// 292
|
|
||||||
// 293 // The mapping from trailing consonants to vowel type
|
|
||||||
// 294
|
|
||||||
// 295 static final int[] tconType = {
|
|
||||||
static const PRUint8 tconType[] = {
|
|
||||||
/* 296 */ 0, 1, 1, 1, 2, 1,
|
|
||||||
/* 297 */ 1, 1, 1, 1, 1, 1,
|
|
||||||
/* 298 */ 1, 1, 1, 1, 1, 1,
|
|
||||||
/* 299 */ 1, 1, 1, 1, 1, 1,
|
|
||||||
/* 300 */ 1, 1, 1, 1,
|
|
||||||
// 301
|
|
||||||
// 302 // ancient trailing consonants (55)
|
|
||||||
/* 303 */ 1, 1, 1, 1, 1, 1, // \u11c3 ~ :
|
|
||||||
/* 304 */ 1, 1, 1, 1, 1, 1, // \u11c9 ~ :
|
|
||||||
/* 305 */ 1, 1, 1, 1, 1, 1, // \u11cf ~ :
|
|
||||||
/* 306 */ 1, 1, 1, 1, 1, 1, // \u11d5 ~ :
|
|
||||||
/* 307 */ 1, 1, 1, 1, 1, 1, // \u11db ~ :
|
|
||||||
/* 308 */ 1, 1, 1, 1, 1, 1, // \u11e1 ~ :
|
|
||||||
/* 309 */ 1, 1, 1, 1, 1, 1, // \u11e7 ~ :
|
|
||||||
/* 310 */ 1, 1, 1, 1, 1, 1, // \u11ed ~ :
|
|
||||||
/* 311 */ 1, 1, 1, 1, 1, 1, // \u11f3 ~ :
|
|
||||||
/* 312 */ 1 // \u11f9:
|
|
||||||
/* 313 */ };
|
|
||||||
//================================================================
|
|
||||||
// 314
|
|
||||||
// 315 // The mapping from vowels to trailing consonant type
|
|
||||||
// 316
|
|
||||||
// 317 static final int[] tconMap = {
|
|
||||||
static const PRUint8 tconMap[] = {
|
|
||||||
/* 318 */ 0, 0, 2, 0, 2, 1, // (Fill), A, AE, YA, YAE, EO
|
|
||||||
/* 319 */ 2, 1, 2, 3, 0, 0, // E, YEO, YE, O, WA, WAE
|
|
||||||
/* 320 */ 0, 3, 3, 1, 1, 1, // OI, YO, U, WEO, WE, WI
|
|
||||||
/* 321 */ 3, 3, 0, 1, // YU, EU, UI, I
|
|
||||||
// 322
|
|
||||||
// 323 // ancient vowels (45)
|
|
||||||
/* 324 */ 3, 3, 3, 3, 3, 3, // \u1176 ~ : A-O, A-U, YA-O, YA-YO, EO-O, EO-U
|
|
||||||
/* 325 */ 3, 3, 3, 1, 0, 0, // \u117c ~ : EO-EU, YEO-O, YEO-U, O-EO, O-E, O-YE
|
|
||||||
/* 326 */ 3, 3, 3, 1, 0, 3, // \u1182 ~ : O-O, O-U, YO-YA, YO-YAE, YO-YEO, YO-O
|
|
||||||
/* 327 */ 0, 0, 0, 0, 0, 3, // \u1188 ~ : YO-I, U-A, U-AE, U-EO-EU, U-YE, U-U
|
|
||||||
/* 328 */ 0, 1, 1, 1, 1, 3, // \u118e ~ : YU-A, YU-EO, YU-E, YU-YEO, YU-YE, YU- U
|
|
||||||
/* 330 */ 1, 3, 3, 3, 2, 2, // \u1194 ~ : YU-I, EU-U, EU-EU, YI-U, I-A, I-YA
|
|
||||||
/* 331 */ 3, 3, 3, 1, 3, 0, // \u119a ~ : I-O, I-U, I-EU, I-ARAEA, ARAEA, ARAEA -EO
|
|
||||||
/* 333 */ 3, 2, 3 // \u11a0 ~ : ARAEA-U, ARAEA-I, SSANGARAEA
|
|
||||||
/* 334 */ };
|
|
||||||
//================================================================
|
|
||||||
// 335
|
|
||||||
// 336 void composeHangul(byte[] output)
|
|
||||||
void nsUnicodeToX11Johab::composeHangul(char* output)
|
|
||||||
/* 337 */ {
|
|
||||||
// 338 int ind;
|
|
||||||
PRUint16 ind;
|
|
||||||
/* 339 */
|
|
||||||
/* 340 */ if ( lconBase[l] != 0 )
|
|
||||||
/* 341 */ { // non-filler and supported by Hanterm Johab fonts
|
|
||||||
/* 342 */ ind = lconBase[l] + ( t > 0 ? lconMap2[v] : lconMap1[v] );
|
|
||||||
/* 343 */ output[byteOff++] = (byte) (ind / 256);
|
|
||||||
/* 344 */ output[byteOff++] = (byte) (ind % 256);
|
|
||||||
/* 345 */ }
|
|
||||||
/* 346 */
|
|
||||||
/* 347 */ if ( vowBase[v] != 0 )
|
|
||||||
/* 348 */ { // non-filler and supported by Hanterm Johab fonts
|
|
||||||
/* 349 */ ind = vowBase[v];
|
|
||||||
/* 350 */ if ( vowType[v] == 1)
|
|
||||||
/* 351 */ { //'o' and alikes
|
|
||||||
/* 352 */ // GIYEOK and KIEUK got special treatment
|
|
||||||
/* 353 */ ind += ( (l == 0 || l == 15) ? 0 : 1)
|
|
||||||
/* 354 */ + (t > 0 ? 2 : 0 );
|
|
||||||
/* 355 */ }
|
|
||||||
/* 356 */ else
|
|
||||||
/* 357 */ {
|
|
||||||
/* 358 */ ind += tconType[t];
|
|
||||||
/* 359 */ }
|
|
||||||
/* 360 */
|
|
||||||
/* 361 */ output[byteOff++] = (byte) (ind / 256);
|
|
||||||
/* 362 */ output[byteOff++] = (byte) (ind % 256);
|
|
||||||
/* 363 */ }
|
|
||||||
/* 364 */
|
|
||||||
/* 365 */ if ( tconBase[t] != 0 )
|
|
||||||
/* 366 */ { // non-filler and supported by Hanterm Johab fonts
|
|
||||||
/* 367 */ ind = tconBase[t] + tconMap[v];
|
|
||||||
/* 368 */ output[byteOff++] = (byte) (ind / 256);
|
|
||||||
/* 369 */ output[byteOff++] = (byte) (ind % 256);
|
|
||||||
/* 370 */ } else if (vowBase[v] == 0)
|
|
||||||
/* 371 */ { // give one syllable display width since current display width is 0.
|
|
||||||
/* 372 */ output[byteOff++] = (byte) 0;
|
|
||||||
/* 373 */ output[byteOff++] = (byte) 0;
|
|
||||||
/* 374 */ }
|
|
||||||
/* 375 */
|
|
||||||
/* 376 */ state = START;
|
|
||||||
/* 377 */ l = 0x5f;
|
|
||||||
/* 378 */ v = t = 0;
|
|
||||||
/* 379 */ }
|
|
||||||
// 380 }
|
|
||||||
// 381
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToX11Johab::FillInfo(PRUint32* aInfo)
|
|
||||||
{
|
|
||||||
// ac00-d7a3
|
|
||||||
PRUint32 b = 0xac00 >> 5;
|
|
||||||
PRUint32 e = 0xd7a3 >> 5;
|
|
||||||
aInfo[ e ] |= (0xFFFFFFFFL >> (31 - ((0xd7a3) & 0x1f)));
|
|
||||||
for( ; b < e ; b++)
|
|
||||||
aInfo[b] |= 0xFFFFFFFFL;
|
|
||||||
|
|
||||||
PRUnichar i;
|
|
||||||
|
|
||||||
// 1100-1112
|
|
||||||
for(i=0x1100;i<=0x1112;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
// 1113-1159
|
|
||||||
for(i=0x1113;i<=0x1159;i++)
|
|
||||||
if(lconBase[i-0x1100]!=0)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
// 115f
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x115f);
|
|
||||||
// 1160-1175
|
|
||||||
for(i=0x1160;i<=0x1175;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
// 1176-11a2
|
|
||||||
for(i=0x1176;i<=0x11a2;i++)
|
|
||||||
if(vowBase[i-0x1160]!=0)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
// 11a8-11c2
|
|
||||||
for(i=0x11a8;i<=0x11c2;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
// 11c3-11f9
|
|
||||||
for(i=0x11c3;i<=0x11f9;i++)
|
|
||||||
if(tconBase[i-0x11a7]!=0)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
@ -1,89 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* <dtkim@calab.kaist.ac.kr>
|
|
||||||
* <jshin@pantheon.yale.edu>
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToX11Johab_h___
|
|
||||||
#define nsUnicodeToX11Johab_h___
|
|
||||||
|
|
||||||
#include "nsUCSupport.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Class nsUnicodeToX11Johab [declaration]
|
|
||||||
|
|
||||||
class nsUnicodeToX11Johab : public nsIUnicodeEncoder, public nsICharRepresentable
|
|
||||||
{
|
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class constructor.
|
|
||||||
*/
|
|
||||||
nsUnicodeToX11Johab();
|
|
||||||
virtual ~nsUnicodeToX11Johab();
|
|
||||||
|
|
||||||
NS_IMETHOD Convert(
|
|
||||||
const PRUnichar * aSrc, PRInt32 * aSrcLength,
|
|
||||||
char * aDest, PRInt32 * aDestLength);
|
|
||||||
|
|
||||||
NS_IMETHOD Finish(
|
|
||||||
char * aDest, PRInt32 * aDestLength);
|
|
||||||
|
|
||||||
NS_IMETHOD GetMaxLength(
|
|
||||||
const PRUnichar * aSrc, PRInt32 aSrcLength,
|
|
||||||
PRInt32 * aDestLength);
|
|
||||||
|
|
||||||
NS_IMETHOD Reset();
|
|
||||||
|
|
||||||
NS_IMETHOD SetOutputErrorBehavior(
|
|
||||||
PRInt32 aBehavior,
|
|
||||||
nsIUnicharEncoder * aEncoder, PRUnichar aChar);
|
|
||||||
|
|
||||||
NS_IMETHOD FillInfo(PRUint32* aInfo);
|
|
||||||
private:
|
|
||||||
PRUint8 state;
|
|
||||||
PRUint8 l;
|
|
||||||
PRUint8 v;
|
|
||||||
PRUint8 t;
|
|
||||||
PRInt32 byteOff;
|
|
||||||
PRInt32 charOff;
|
|
||||||
void composeHangul(char* output);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToX11Johab_h___ */
|
|
@ -179,13 +179,6 @@ CPPSRCS = \
|
|||||||
nsUnicodeToTSCII.cpp \
|
nsUnicodeToTSCII.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
CPPSRCS += \
|
|
||||||
nsUnicodeToLangBoxArabic8.cpp \
|
|
||||||
nsUnicodeToLangBoxArabic16.cpp \
|
|
||||||
$(NULL)
|
|
||||||
endif
|
|
||||||
|
|
||||||
EXPORTS = nsUCvLatinCID.h
|
EXPORTS = nsUCvLatinCID.h
|
||||||
|
|
||||||
LOCAL_INCLUDES = -I$(srcdir)/../util -I$(srcdir)/../src
|
LOCAL_INCLUDES = -I$(srcdir)/../util -I$(srcdir)/../src
|
||||||
|
@ -617,12 +617,6 @@
|
|||||||
#define NS_UNICODETOTIS620WIN_CID \
|
#define NS_UNICODETOTIS620WIN_CID \
|
||||||
{ 0x4f26b731, 0x46cb, 0x11d3, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
{ 0x4f26b731, 0x46cb, 0x11d3, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// {49B38F11-6193-11d3-B3C5-00805F8A6670}
|
|
||||||
#define NS_UNICODETOLANGBOXARABIC8_CID \
|
|
||||||
{ 0x49b38f11, 0x6193, 0x11d3, {0xb3, 0xc5, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
#endif // MOZ_EXTRA_X11CONVERTERS
|
|
||||||
|
|
||||||
// {49B38F12-6193-11d3-B3C5-00805F8A6670}
|
// {49B38F12-6193-11d3-B3C5-00805F8A6670}
|
||||||
#define NS_UNICODETOUTF16_CID \
|
#define NS_UNICODETOUTF16_CID \
|
||||||
{ 0x49b38f12, 0x6193, 0x11d3, {0xb3, 0xc5, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
{ 0x49b38f12, 0x6193, 0x11d3, {0xb3, 0xc5, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
||||||
@ -687,14 +681,4 @@
|
|||||||
#define NS_UNICODETOTAMILTTF_CID \
|
#define NS_UNICODETOTAMILTTF_CID \
|
||||||
{ 0xa431b276, 0xf77d, 0x4b83, {0x9b, 0x37, 0x87, 0x2c, 0xf2, 0xfb, 0xcc, 0x2a } }
|
{ 0xa431b276, 0xf77d, 0x4b83, {0x9b, 0x37, 0x87, 0x2c, 0xf2, 0xfb, 0xcc, 0x2a } }
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// {4DBBD94F-0153-44cb-966A-7F39B9CB477D}
|
|
||||||
#define NS_UNICODETOLANGBOXARABIC_CID \
|
|
||||||
{ 0x4dbbd94f, 0x153, 0x44cb, { 0x96, 0x6a, 0x7f, 0x39, 0xb9, 0xcb, 0x47, 0x7d } }
|
|
||||||
|
|
||||||
// {8E269A63-94B4-46e5-A31F-11F0EDE6065B}
|
|
||||||
#define NS_UNICODETOLANGBOXARABIC16_CID \
|
|
||||||
{ 0x8e269a63, 0x94b4, 0x46e5, { 0xa3, 0x1f, 0x11, 0xf0, 0xed, 0xe6, 0x6, 0x5b } }
|
|
||||||
#endif // MOZ_EXTRA_X11CONVERTERS
|
|
||||||
|
|
||||||
#endif /* nsUCvLatinCID_h___ */
|
#endif /* nsUCvLatinCID_h___ */
|
||||||
|
@ -1,328 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* Simon Montagu <smontagu@netscape.com>
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
#include "nsUnicodeToLangBoxArabic16.h"
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
// This table is based on http://www.langbox.com/arabic/FontSet_ISO8859-6-16.html
|
|
||||||
// Codepoints not in Unicode are mapped to 0x3F
|
|
||||||
static const unsigned char uni2lbox [] =
|
|
||||||
{
|
|
||||||
0x6B, // U+FE70 ARABIC FATHATAN ISOLATED FORM
|
|
||||||
0x90, // U+FE71 ARABIC FATHATAN ON TATWEEL
|
|
||||||
0x6C, // U+FE72 ARABIC DAMMATAN ISOLATED FORM
|
|
||||||
0x3F, // U+FE73
|
|
||||||
0x6D, // U+FE74 ARABIC KASRATAN ISOLATED FORM
|
|
||||||
0x3F, // U+FE75
|
|
||||||
0x6E, // U+FE76 ARABIC FATHA ISOLATED FORM
|
|
||||||
0x93, // U+FE77 ARABIC FATHA ON TATWEEL
|
|
||||||
0x6F, // U+FE78 ARABIC DAMMA ISOLATED FORM
|
|
||||||
0x94, // U+FE79 ARABIC DAMMA ON TATWEEL
|
|
||||||
0x70, // U+FE7A ARABIC KASRA ISOLATED FORM
|
|
||||||
0x95, // U+FE7B ARABIC KASRA ON TATWEEL
|
|
||||||
0x71, // U+FE7C ARABIC SHADDA ISOLATED FORM
|
|
||||||
0x97, // U+FE7D ARABIC SHADDA ON TATWEEL
|
|
||||||
0x72, // U+FE7E ARABIC SUKUN ISOLATED FORM
|
|
||||||
0x96, // U+FE7F ARABIC SUKUN ON TATWEEL
|
|
||||||
0x41, // U+FE80 ARABIC HAMZA ISOLATED FORM
|
|
||||||
0x42, // U+FE81 ARABIC LIGATURE MADDA ON ALEF ISOLATED FORM
|
|
||||||
0xA1, // U+FE82 ARABIC LIGATURE MADDA ON ALEF FINAL FORM
|
|
||||||
0x43, // U+FE83 ARABIC LIGATURE HAMZA ON ALEF ISOLATED FORM
|
|
||||||
0xA2, // U+FE84 ARABIC LIGATURE HAMZA ON ALEF FINAL FORM
|
|
||||||
0x44, // U+FE85 ARABIC LIGATURE HAMZA ON WAW ISOLATED FORM
|
|
||||||
0xA3, // U+FE86 ARABIC LIGATURE HAMZA ON WAW FINAL FORM
|
|
||||||
0x45, // U+FE87 ARABIC LIGATURE HAMZA UNDER ALEF ISOLATED FORM
|
|
||||||
0xA4, // U+FE88 ARABIC LIGATURE HAMZA UNDER ALEF FINAL FORM
|
|
||||||
0x46, // U+FE89 ARABIC LIGATURE HAMZA ON YEH ISOLATED FORM
|
|
||||||
0xF9, // U+FE8A ARABIC LIGATURE HAMZA ON YA FINAL FORM
|
|
||||||
0xF8, // U+FE8B ARABIC LIGATURE HAMZA ON YA INITIAL FORM
|
|
||||||
0xA0, // U+FE8C ARABIC LIGATURE HAMZA ON YA MEDIAL FORM
|
|
||||||
0x47, // U+FE8D ARABIC ALEF ISOLATED FORM
|
|
||||||
0xA5, // U+FE8E ARABIC ALEF FINAL FORM
|
|
||||||
0x48, // U+FE8F ARABIC BAA ISOLATED FORM
|
|
||||||
0xAE, // U+FE90 ARABIC BAA FINAL FORM
|
|
||||||
0xAC, // U+FE91 ARABIC BAA INITTIAL FORM
|
|
||||||
0xAD, // U+FE92 ARABIC BAA MEDIAL FORM
|
|
||||||
0x49, // U+FE93 ARABIC TAA MARBUTA ISOLATED FORM
|
|
||||||
0xB1, // U+FE94 ARABIC TAA MARBUTA FINAL FORM
|
|
||||||
0x4A, // U+FE95 ARABIC TAA ISOLATED FORM
|
|
||||||
0xB4, // U+FE96 ARABIC TAA FINAL FORM
|
|
||||||
0xB2, // U+FE97 ARABIC TAA INITIAL FORM
|
|
||||||
0xB3, // U+FE98 ARABIC TAA MEDIAL FORM
|
|
||||||
0x4B, // U+FE99 ARABIC THAA ISOLATED FORM
|
|
||||||
0xB7, // U+FE9A ARABIC THAA FINAL FORM
|
|
||||||
0xB5, // U+FE9B ARABIC THAA INITIAL FORM
|
|
||||||
0xB6, // U+FE9C ARABIC THAA MEDIAL FORM
|
|
||||||
0x4C, // U+FE9D ARABIC JEEM ISOLATED FORM
|
|
||||||
0xBA, // U+FE9E ARABIC JEEM FINAL FORM
|
|
||||||
0xB8, // U+FE9F ARABIC JEEM INITIAL FORM
|
|
||||||
0xB9, // U+FEA0 ARABIC JEEM MEDIAL FORM
|
|
||||||
0x4D, // U+FEA1 ARABIC HAA ISOLATED FORM
|
|
||||||
0xBD, // U+FEA2 ARABIC HAA FINAL FORM
|
|
||||||
0xBB, // U+FEA3 ARABIC HAA INITIAL FORM
|
|
||||||
0xBC, // U+FEA4 ARABIC HAA MEDIAL FORM
|
|
||||||
0x4E, // U+FEA5 ARABIC KHAA ISOLATED FORM
|
|
||||||
0xC0, // U+FEA6 ARABIC KHAA FINAL FORM
|
|
||||||
0xBE, // U+FEA7 ARABIC KHAA INITIAL FORM
|
|
||||||
0xBF, // U+FEA8 ARABIC KHAA MEDIAL FORM
|
|
||||||
0x4F, // U+FEA9 ARABIC DAL ISOLATED FORM
|
|
||||||
0xA6, // U+FEAA ARABIC DAL FINAL FORM
|
|
||||||
0x50, // U+FEAB ARABIC THAL ISOLATED FORM
|
|
||||||
0xA7, // U+FEAC ARABIC THAL FINAL FORM
|
|
||||||
0x51, // U+FEAD ARABIC RA ISOLATED FORM
|
|
||||||
0xA8, // U+FEAE ARABIC RA FINAL FORM
|
|
||||||
0x52, // U+FEAF ARABIC ZAIN ISOLATED FORM
|
|
||||||
0xA9, // U+FEB0 ARABIC ZAIN FINAL FORM
|
|
||||||
0x53, // U+FEB1 ARABIC SEEN ISOLATED FORM
|
|
||||||
0xC3, // U+FEB2 ARABIC SEEN FINAL FORM
|
|
||||||
0xC1, // U+FEB3 ARABIC SEEN INITIAL FORM
|
|
||||||
0xC2, // U+FEB4 ARABIC SEEN IMEDIAL FORM
|
|
||||||
0x54, // U+FEB5 ARABIC SHEEN ISOLATED FORM
|
|
||||||
0xC6, // U+FEB6 ARABIC SHEEN FINAL FORM
|
|
||||||
0xC4, // U+FEB7 ARABIC SHEEN INITIAL FORM
|
|
||||||
0xC5, // U+FEB8 ARABIC SHEEN MEDIAL FORM
|
|
||||||
0x55, // U+FEB9 ARABIC SAD ISOLATED FORM
|
|
||||||
0xC9, // U+FEBA ARABIC SAD FINAL FORM
|
|
||||||
0xC7, // U+FEBB ARABIC SAD INITIAL FORM
|
|
||||||
0xC8, // U+FEBC ARABIC SAD MEDIAL FORM
|
|
||||||
0x56, // U+FEBD ARABIC DAD ISOLATED FORM
|
|
||||||
0xCC, // U+FEBE ARABIC DAD FINAL FORM
|
|
||||||
0xCA, // U+FEBF ARABIC DAD INITIAL FORM
|
|
||||||
0xCB, // U+FEC0 ARABIC DAD MEDIAL FORM
|
|
||||||
0x57, // U+FEC1 ARABIC TAH ISOLATED FORM
|
|
||||||
0xCF, // U+FEC2 ARABIC TAH FINAL FORM
|
|
||||||
0xCD, // U+FEC3 ARABIC TAH INITIAL FORM
|
|
||||||
0xCE, // U+FEC4 ARABIC TAH MEDIAL FORM
|
|
||||||
0x58, // U+FEC5 ARABIC ZAH ISOLATED FORM
|
|
||||||
0xD2, // U+FEC6 ARABIC ZAH FINAL FORM
|
|
||||||
0xD0, // U+FEC7 ARABIC ZAH INITIAL FORM
|
|
||||||
0xD1, // U+FEC8 ARABIC ZAH MEDIAL FORM
|
|
||||||
0x59, // U+FEC9 ARABIC AIN ISOLATED FORM
|
|
||||||
0xD5, // U+FECA ARABIC AIN FINAL FORM
|
|
||||||
0xD3, // U+FECB ARABIC AIN INITIAL FORM
|
|
||||||
0xD4, // U+FECC ARABIC AIN MEDIAL FORM
|
|
||||||
0x5A, // U+FECD ARABIC GHAIN ISOLATED FORM
|
|
||||||
0xD8, // U+FECE ARABIC GHAIN FINAL FORM
|
|
||||||
0xD6, // U+FECF ARABIC GHAIN INITIAL FORM
|
|
||||||
0xD7, // U+FED0 ARABIC GHAIN MEDIAL FORM
|
|
||||||
0x61, // U+FED1 ARABIC FA ISOLATED FORM
|
|
||||||
0xDB, // U+FED2 ARABIC FEH FINAL FORM
|
|
||||||
0xD9, // U+FED3 ARABIC FEH INITIAL FORM
|
|
||||||
0xDA, // U+FED4 ARABIC FEH MEDIAL FORM
|
|
||||||
0x62, // U+FED5 ARABIC QAF ISOLATED FORM
|
|
||||||
0xDE, // U+FED6 ARABIC QAF FINAL FORM
|
|
||||||
0xDC, // U+FED7 ARABIC QAF INITIAL FORM
|
|
||||||
0xDD, // U+FED8 ARABIC QAF MEDIAL FORM
|
|
||||||
0x63, // U+FED9 ARABIC KAF ISOLATED FORM
|
|
||||||
0xE1, // U+FEDA ARABIC KAF FINAL FORM
|
|
||||||
0xDF, // U+FEDB ARABIC KAF INITIAL FORM
|
|
||||||
0xE0, // U+FEDC ARABIC KAF MEDIAL FORM
|
|
||||||
0x64, // U+FEDD ARABIC LAM ISOLATED FORM
|
|
||||||
0xE4, // U+FEDE ARABIC LAM FINAL FORM
|
|
||||||
0xE2, // U+FEDF ARABIC LAM INITIAL FORM
|
|
||||||
0xE3, // U+FEE0 ARABIC LAM MEDIAL FORM
|
|
||||||
0x65, // U+FEE1 ARABIC MEEM ISOLATED FORM
|
|
||||||
0xE7, // U+FEE2 ARABIC MEEM FINAL FORM
|
|
||||||
0xE5, // U+FEE3 ARABIC MEEM INITIAL FORM
|
|
||||||
0xE6, // U+FEE4 ARABIC MEEM MEDIAL FORM
|
|
||||||
0x66, // U+FEE5 ARABIC NOON ISOLATED FORM
|
|
||||||
0xEA, // U+FEE6 ARABIC NOON FINAL FORM
|
|
||||||
0xE8, // U+FEE7 ARABIC NOON INITIAL FORM
|
|
||||||
0xE9, // U+FEE8 ARABIC NOON MEDIAL FORM
|
|
||||||
0x67, // U+FEE9 ARABIC HA ISOLATED FORM
|
|
||||||
0xED, // U+FEEA ARABIC HEH FINAL FORM
|
|
||||||
0xEB, // U+FEEB ARABIC HEH INITIAL FORM
|
|
||||||
0xEC, // U+FEEC ARABIC HEH MEDIAL FORM
|
|
||||||
0x68, // U+FEED ARABIC WAW ISOLATED FORM
|
|
||||||
0xAA, // U+FEEE ARABIC WAW FINAL FORM
|
|
||||||
0x69, // U+FEEF ARABIC ALEF MAKSURA ISOLATED FORM
|
|
||||||
0xAB, // U+FEF0 ARABIC ALEF MAKSURA FINAL FORM
|
|
||||||
0x6A, // U+FEF1 ARABIC YEH ISOLATED FORM
|
|
||||||
0xF0, // U+FEF2 ARABIC YEH FINAL FORM
|
|
||||||
0xEE, // U+FEF3 ARABIC YEH INITIAL FORM
|
|
||||||
0xEF, // U+FEF4 ARABIC YEH MEDIAL FORM
|
|
||||||
0x76, // U+FEF5 ARABIC LIGATURE MADDA ON LAM ALEF ISOLATED FORM
|
|
||||||
0xFA, // U+FEF6 ARABIC LIGATURE MADDA ON LAM ON ALEF FINAL FORM
|
|
||||||
0x77, // U+FEF7 ARABIC LIGATURE HAMZA ON LAM ALEF ISOLATED FORM
|
|
||||||
0xFC, // U+FEF8 ARABIC LIGATURE HAMZA ON LAM ALEF FINAL FORM
|
|
||||||
0x78, // U+FEF9 ARABIC LIGATURE HAMZA UNDER LAM ALEF ISOLATED FORM
|
|
||||||
0xFB, // U+FEFA ARABIC LIGATURE HAMZA UNDER LAM ALEF FINAL FORM
|
|
||||||
0x79, // U+FEFB ARABIC LIGATURE LAM ALEF ISOLATED FORM
|
|
||||||
0xFD // U+FEFC ARABIC LIGATURE LAM ALEF FINAL FORM
|
|
||||||
};
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic16::Convert(
|
|
||||||
const PRUnichar * aSrc, PRInt32 * aSrcLength,
|
|
||||||
char * aDest, PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
char* dest = aDest;
|
|
||||||
PRInt32 inlen = 0;
|
|
||||||
|
|
||||||
while (inlen < *aSrcLength) {
|
|
||||||
PRUnichar aChar = aSrc[inlen];
|
|
||||||
|
|
||||||
if (((aChar >= 0x0020) && (aChar <= 0x0027)) ||
|
|
||||||
(aChar == 0x2A) ||
|
|
||||||
(aChar == 0x2B) ||
|
|
||||||
((aChar >= 0x002D) && (aChar <= 0x002F)) ||
|
|
||||||
(aChar == 0x003A) ||
|
|
||||||
((aChar >= 0x003C) && (aChar <= 0x003E)) ||
|
|
||||||
(aChar == 0x40) ||
|
|
||||||
(aChar == 0x5C) ||
|
|
||||||
(aChar == 0x5E) ||
|
|
||||||
(aChar == 0x5F) ||
|
|
||||||
(aChar == 0x7C) ||
|
|
||||||
(aChar == 0x7E)) {
|
|
||||||
*dest++ = (char) aChar;
|
|
||||||
// ISO-8859-6-16 swaps symmetric characters internally, but we have
|
|
||||||
// already swapped them where necessary during Bidi reordering, so we
|
|
||||||
// must swap them back here.
|
|
||||||
} else if (0x0028 == aChar) {
|
|
||||||
*dest++ = 0x29;
|
|
||||||
} else if (0x0029 == aChar) {
|
|
||||||
*dest++ = 0x28;
|
|
||||||
} else if (0x005B == aChar) {
|
|
||||||
*dest++ = 0x5D;
|
|
||||||
} else if (0x005D == aChar) {
|
|
||||||
*dest++ = 0x5B;
|
|
||||||
} else if (0x007B == aChar) {
|
|
||||||
*dest++ = 0x7D;
|
|
||||||
} else if (0x007D == aChar) {
|
|
||||||
*dest++ = 0x7B;
|
|
||||||
} else if (0x060C == aChar) {
|
|
||||||
// ARABIC COMMA
|
|
||||||
*dest++ = 0x2C;
|
|
||||||
} else if (0x061B == aChar) {
|
|
||||||
// ARABIC SEMICOLON
|
|
||||||
*dest++ = 0x3B;
|
|
||||||
} else if (0x061F == aChar) {
|
|
||||||
// ARABIC QUESTION MARK
|
|
||||||
*dest++ = 0x3F;
|
|
||||||
} else if (0x0640 == aChar) {
|
|
||||||
// ARABIC TATWEEL
|
|
||||||
*dest++ = 0x60;
|
|
||||||
} else if ((aChar >= 0x0660) && (aChar <=0x0669)) {
|
|
||||||
// ARABIC-INDIC DIGITS
|
|
||||||
*dest++ = (char)(aChar - 0x0660 + 0x30);
|
|
||||||
} else if ((aChar>=0xFE70) && (aChar <= 0xFEFC)) {
|
|
||||||
// ARABIC PRESENTATION FORMS
|
|
||||||
*dest++ = uni2lbox[aChar-0xFE70];
|
|
||||||
} else {
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
inlen++;
|
|
||||||
}
|
|
||||||
|
|
||||||
*aDestLength = dest - aDest;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic16::GetMaxLength(
|
|
||||||
const PRUnichar * aSrc, PRInt32 aSrcLength,
|
|
||||||
PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
*aDestLength = aSrcLength;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic16::Finish(
|
|
||||||
char * aDest, PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
*aDestLength=0;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic16::Reset()
|
|
||||||
{
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic16::SetOutputErrorBehavior(
|
|
||||||
PRInt32 aBehavior,
|
|
||||||
nsIUnicharEncoder * aEncoder, PRUnichar aChar)
|
|
||||||
{
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic16::FillInfo(PRUint32* aInfo)
|
|
||||||
{
|
|
||||||
PRUnichar i;
|
|
||||||
|
|
||||||
/* Start off by marking the whole ASCII range as unrepresentable. If we
|
|
||||||
* don't do this we will try to use an ISO-8859-6.16 font for ASCII text
|
|
||||||
* embedded in Arabic content, and it will not be rendered correctly.
|
|
||||||
* See discussion in bug 172491
|
|
||||||
*/
|
|
||||||
for(i=0x0000; i <= 0x007F; i++)
|
|
||||||
CLEAR_REPRESENTABLE(aInfo, i);
|
|
||||||
|
|
||||||
// Mark the few exceptions as representable.
|
|
||||||
for(i=0x0020; i <= 0x002B; i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i=0x002D; i <= 0x002F; i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x003A);
|
|
||||||
for(i=0x003C; i <= 0x003E; i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x0040);
|
|
||||||
for(i=0x005B; i <= 0x005F; i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i=0x007B; i <= 0x007E;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
|
|
||||||
// Arabic punctuation and numerals
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x060c);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x061b);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x061f);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x0640);
|
|
||||||
for(i=0x0660; i<=0x0669; i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
|
|
||||||
// Arabic Pres Form-B
|
|
||||||
for(i=0xFE70; i <= 0xFE72; i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0xFE74);
|
|
||||||
for(i=0xFE76; i <= 0xFEFC; i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
@ -1,75 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
* Simon Montagu <smontagu@netscape.com>
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
#ifndef nsUnicodeToLangBoxArabic16_h__
|
|
||||||
#define nsUnicodeToLangBoxArabic16_h__
|
|
||||||
#include "nsUCSupport.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Class nsUnicodeToLangBoxArabic16 [declaration]
|
|
||||||
class nsUnicodeToLangBoxArabic16 : public nsBasicEncoder
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class constructor.
|
|
||||||
*/
|
|
||||||
nsUnicodeToLangBoxArabic16() {}
|
|
||||||
virtual ~nsUnicodeToLangBoxArabic16() {}
|
|
||||||
|
|
||||||
NS_IMETHOD Convert(
|
|
||||||
const PRUnichar * aSrc, PRInt32 * aSrcLength,
|
|
||||||
char * aDest, PRInt32 * aDestLength);
|
|
||||||
|
|
||||||
NS_IMETHOD Finish(
|
|
||||||
char * aDest, PRInt32 * aDestLength);
|
|
||||||
|
|
||||||
NS_IMETHOD GetMaxLength(
|
|
||||||
const PRUnichar * aSrc, PRInt32 aSrcLength,
|
|
||||||
PRInt32 * aDestLength);
|
|
||||||
|
|
||||||
NS_IMETHOD Reset();
|
|
||||||
|
|
||||||
NS_IMETHOD SetOutputErrorBehavior(
|
|
||||||
PRInt32 aBehavior,
|
|
||||||
nsIUnicharEncoder * aEncoder, PRUnichar aChar);
|
|
||||||
|
|
||||||
NS_IMETHOD FillInfo(PRUint32* aInfo);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // nsUnicodeToLangBoxArabic16_h__
|
|
@ -1,295 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
#include "nsUnicodeToLangBoxArabic8.h"
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
static const unsigned char uni2lbox [] =
|
|
||||||
{
|
|
||||||
0xC1, /* FE80 */
|
|
||||||
0xC2 ,
|
|
||||||
0xC2 ,
|
|
||||||
0xC3 ,
|
|
||||||
0xC3 ,
|
|
||||||
0xC4 ,
|
|
||||||
0xC4 ,
|
|
||||||
0xC5 ,
|
|
||||||
0xC5 ,
|
|
||||||
0x9F ,
|
|
||||||
0xC6 ,
|
|
||||||
0xC0 ,
|
|
||||||
0xC0 ,
|
|
||||||
0xC7 ,
|
|
||||||
0xC7 ,
|
|
||||||
0xC8 ,
|
|
||||||
0xC8 , /* FE90 */
|
|
||||||
0xEB ,
|
|
||||||
0xEB ,
|
|
||||||
0xC9 ,
|
|
||||||
0x8E , /* START TAA MARBUTA FINAL */
|
|
||||||
0xCA ,
|
|
||||||
0xCA ,
|
|
||||||
0xEC ,
|
|
||||||
0xEC ,
|
|
||||||
0xCB ,
|
|
||||||
0xCB ,
|
|
||||||
0xED ,
|
|
||||||
0xED ,
|
|
||||||
0xCC ,
|
|
||||||
0xCC ,
|
|
||||||
0xEE ,
|
|
||||||
0xEE ,
|
|
||||||
0xCD ,
|
|
||||||
0xCD ,
|
|
||||||
0xEF ,
|
|
||||||
0xEF ,
|
|
||||||
0xCE ,
|
|
||||||
0xCE ,
|
|
||||||
0xF0 ,
|
|
||||||
0xF0 ,
|
|
||||||
0xCF ,
|
|
||||||
0xCF ,
|
|
||||||
0xD0 ,
|
|
||||||
0xD0 ,
|
|
||||||
0xD1 ,
|
|
||||||
0xD1 ,
|
|
||||||
0xD2 ,
|
|
||||||
0xD2 ,
|
|
||||||
0xD3 ,
|
|
||||||
0x8F ,
|
|
||||||
0xF1 ,
|
|
||||||
0xF1 ,
|
|
||||||
0xD4 ,
|
|
||||||
0x90 ,
|
|
||||||
0xF2 ,
|
|
||||||
0xF2 ,
|
|
||||||
0xD5 ,
|
|
||||||
0x91 ,
|
|
||||||
0xF3 ,
|
|
||||||
0xF3 ,
|
|
||||||
0xD6 ,
|
|
||||||
0x92 ,
|
|
||||||
0xF4 ,
|
|
||||||
0xF4 ,
|
|
||||||
0xD7 ,
|
|
||||||
0xD7 ,
|
|
||||||
0x93 ,
|
|
||||||
0x93 ,
|
|
||||||
0xD8 ,
|
|
||||||
0xD8 ,
|
|
||||||
0x94 ,
|
|
||||||
0x94 ,
|
|
||||||
0xD9 ,
|
|
||||||
0x96 ,
|
|
||||||
0xF5 ,
|
|
||||||
0x95 ,
|
|
||||||
0xDA ,
|
|
||||||
0x98 ,
|
|
||||||
0xF6 ,
|
|
||||||
0x97 ,
|
|
||||||
0xE1 ,
|
|
||||||
0xE1 ,
|
|
||||||
0xF7 ,
|
|
||||||
0x99 ,
|
|
||||||
0xE2 ,
|
|
||||||
0xE2 ,
|
|
||||||
0xF8 ,
|
|
||||||
0x9A ,
|
|
||||||
0xE3 ,
|
|
||||||
0xE3 ,
|
|
||||||
0xF9 ,
|
|
||||||
0x9B ,
|
|
||||||
0xE4 ,
|
|
||||||
0xE4 ,
|
|
||||||
0xFA ,
|
|
||||||
0xFA ,
|
|
||||||
0xE5 ,
|
|
||||||
0xE5 ,
|
|
||||||
0xFB ,
|
|
||||||
0xFB ,
|
|
||||||
0xE6 ,
|
|
||||||
0xE6 ,
|
|
||||||
0xFC ,
|
|
||||||
0xFC ,
|
|
||||||
0xE7 ,
|
|
||||||
0x9D ,
|
|
||||||
0xFD ,
|
|
||||||
0x9C ,
|
|
||||||
0xE8 ,
|
|
||||||
0xE8 ,
|
|
||||||
0x8D ,
|
|
||||||
0xE9 ,
|
|
||||||
0x9E ,
|
|
||||||
0xEA ,
|
|
||||||
0xFE ,
|
|
||||||
0xFE /* FEF4 */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The following are the Unicode Lam-Alef ligatures:
|
|
||||||
*
|
|
||||||
* FEF5;ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
|
|
||||||
* FEF6;ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM
|
|
||||||
* FEF7;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
|
|
||||||
* FEF8;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM
|
|
||||||
* FEF9;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM
|
|
||||||
* FEFA;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM
|
|
||||||
* FEFB;ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
|
|
||||||
* FEFC;ARABIC LIGATURE LAM WITH ALEF FINAL FORM
|
|
||||||
*
|
|
||||||
* In the Langbox 8x encoding, they have to be split into separate glyphs:
|
|
||||||
*
|
|
||||||
* 0xA1 ARABIC LIGATURE ALEF OF LAM ALEF
|
|
||||||
* 0xA2 ARABIC LIGATURE MADDA ON ALEF OF LAM ALEF
|
|
||||||
* 0xA3 ARABIC LIGATURE HAMZA ON ALEF OF LAM ALEF
|
|
||||||
* 0xA4 ARABIC LIGATURE HAMZA UNDER ALEF OF LAM ALEF
|
|
||||||
* 0xA5 ARABIC LIGATURE LAM OF LAM ALEF INITIAL FORM
|
|
||||||
* 0xA6 ARABIC LIGATURE LAM OF LAM ALEF MEDIAL FORM
|
|
||||||
*/
|
|
||||||
|
|
||||||
static const unsigned char lboxAlefs[] =
|
|
||||||
{
|
|
||||||
0xA2,
|
|
||||||
0xA3,
|
|
||||||
0xA4,
|
|
||||||
0xA1
|
|
||||||
};
|
|
||||||
|
|
||||||
static const unsigned char lboxLams[] =
|
|
||||||
{
|
|
||||||
0xA5,
|
|
||||||
0xA6
|
|
||||||
};
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic8::Convert(
|
|
||||||
const PRUnichar * aSrc, PRInt32 * aSrcLength,
|
|
||||||
char * aDest, PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
char* dest = aDest;
|
|
||||||
PRInt32 inlen = 0;
|
|
||||||
|
|
||||||
while (inlen < *aSrcLength) {
|
|
||||||
PRUnichar aChar = aSrc[inlen];
|
|
||||||
|
|
||||||
if((aChar >= 0x0660) && (aChar <=0x0669)) { /* Hindu Numerals */
|
|
||||||
*dest++ = (char)(aChar - 0x0660 + 0xB0);
|
|
||||||
} else if ((aChar >= 0x064B) && (aChar <= 0x0652)) {
|
|
||||||
*dest++ = (char)(aChar - 0x64B + 0xA8);
|
|
||||||
} else if(0x060C == aChar) {
|
|
||||||
*dest++ = (char)0xBA;
|
|
||||||
} else if(0x061B == aChar) {
|
|
||||||
*dest++ = (char)0xBB;
|
|
||||||
} else if(0x061F == aChar) {
|
|
||||||
*dest++ = (char)0xBF;
|
|
||||||
} else if(0x0640 == aChar) {
|
|
||||||
*dest++ = (char)0xE0;
|
|
||||||
} else if ((aChar>=0xFE80) && (aChar <= 0xFEF4)) {
|
|
||||||
*dest++ = uni2lbox[aChar-0xFE80];
|
|
||||||
} else if ((aChar >=0xFEF5) && (aChar <= 0xFEFC)) {
|
|
||||||
PRUint8 lamAlefType = aChar - 0xFEF5; // first map to 0-7 range,
|
|
||||||
PRUint8 alefType = (lamAlefType & 6) >> 1; // then the high 2 bits give us the type of alef
|
|
||||||
PRUint8 lamType = lamAlefType & 1; // and the low bits give us the type of lam
|
|
||||||
|
|
||||||
*dest++ = lboxAlefs[alefType];
|
|
||||||
*dest++ = lboxLams[lamType];
|
|
||||||
} else if ((aChar >=0x0001) && (aChar <= 0x007F)) {
|
|
||||||
*dest++ = (char) (aChar & 0x7F);
|
|
||||||
} else {
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
inlen++;
|
|
||||||
}
|
|
||||||
|
|
||||||
*aDestLength = dest - aDest;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic8::GetMaxLength(
|
|
||||||
const PRUnichar * aSrc, PRInt32 aSrcLength,
|
|
||||||
PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
*aDestLength = 2*aSrcLength;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic8::Finish(
|
|
||||||
char * aDest, PRInt32 * aDestLength)
|
|
||||||
{
|
|
||||||
*aDestLength=0;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic8::Reset()
|
|
||||||
{
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic8::SetOutputErrorBehavior(
|
|
||||||
PRInt32 aBehavior,
|
|
||||||
nsIUnicharEncoder * aEncoder, PRUnichar aChar)
|
|
||||||
{
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToLangBoxArabic8::FillInfo(PRUint32* aInfo)
|
|
||||||
{
|
|
||||||
PRUnichar i;
|
|
||||||
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x060c);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x061b);
|
|
||||||
SET_REPRESENTABLE(aInfo, 0x061f);
|
|
||||||
for(i=0x0621;i<=0x063a;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i=0x0640;i<=0x0652;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
for(i=0x0660;i<=0x0669;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
|
|
||||||
// Arabic Pres Form-B
|
|
||||||
for(i=0xFE80; i < 0xFEFD;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
|
|
||||||
// ASCII range
|
|
||||||
for(i=0x0000; i < 0x007f;i++)
|
|
||||||
SET_REPRESENTABLE(aInfo, i);
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
@ -1,74 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
#ifndef nsUnicodeToLangBoxArabic8_h__
|
|
||||||
#define nsUnicodeToLangBoxArabic8_h__
|
|
||||||
#include "nsUCSupport.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Class nsUnicodeToLangBoxArabic8 [declaration]
|
|
||||||
class nsUnicodeToLangBoxArabic8 : public nsBasicEncoder
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class constructor.
|
|
||||||
*/
|
|
||||||
nsUnicodeToLangBoxArabic8() {}
|
|
||||||
virtual ~nsUnicodeToLangBoxArabic8() {}
|
|
||||||
|
|
||||||
NS_IMETHOD Convert(
|
|
||||||
const PRUnichar * aSrc, PRInt32 * aSrcLength,
|
|
||||||
char * aDest, PRInt32 * aDestLength);
|
|
||||||
|
|
||||||
NS_IMETHOD Finish(
|
|
||||||
char * aDest, PRInt32 * aDestLength);
|
|
||||||
|
|
||||||
NS_IMETHOD GetMaxLength(
|
|
||||||
const PRUnichar * aSrc, PRInt32 aSrcLength,
|
|
||||||
PRInt32 * aDestLength);
|
|
||||||
|
|
||||||
NS_IMETHOD Reset();
|
|
||||||
|
|
||||||
NS_IMETHOD SetOutputErrorBehavior(
|
|
||||||
PRInt32 aBehavior,
|
|
||||||
nsIUnicharEncoder * aEncoder, PRUnichar aChar);
|
|
||||||
|
|
||||||
NS_IMETHOD FillInfo(PRUint32* aInfo);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // nsUnicodeToLangBoxArabic8_h__
|
|
@ -59,12 +59,6 @@ CPPSRCS = \
|
|||||||
nsUnicodeToHKSCS.cpp \
|
nsUnicodeToHKSCS.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
CPPSRCS += \
|
|
||||||
nsUnicodeToBIG5NoAscii.cpp \
|
|
||||||
$(NULL)
|
|
||||||
endif
|
|
||||||
|
|
||||||
EXPORTS = nsUCvTWCID.h
|
EXPORTS = nsUCvTWCID.h
|
||||||
|
|
||||||
LOCAL_INCLUDES = -I$(srcdir)/../util
|
LOCAL_INCLUDES = -I$(srcdir)/../util
|
||||||
|
@ -50,15 +50,6 @@
|
|||||||
#define NS_UNICODETOBIG5_CID \
|
#define NS_UNICODETOBIG5_CID \
|
||||||
{ 0xefc323e2, 0xec62, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
|
{ 0xefc323e2, 0xec62, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
|
||||||
|
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// Class ID for our UnicodeToBIG5NoAscii charset converter
|
|
||||||
// {BA615195-1DFA-11d3-B3BF-00805F8A6670}
|
|
||||||
#define NS_UNICODETOBIG5NOASCII_CID \
|
|
||||||
{ 0xba615195, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Class ID for our BIG5HKSCSToUnicode charset converter
|
// Class ID for our BIG5HKSCSToUnicode charset converter
|
||||||
// {BA6151BB-EC62-11d2-8AAC-00600811A836}
|
// {BA6151BB-EC62-11d2-8AAC-00600811A836}
|
||||||
#define NS_BIG5HKSCSTOUNICODE_CID \
|
#define NS_BIG5HKSCSTOUNICODE_CID \
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToBIG5NoAscii.h"
|
|
||||||
#include "nsUCvTWDll.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Class nsUnicodeToBIG5NoAscii [implementation]
|
|
||||||
|
|
||||||
nsUnicodeToBIG5NoAscii::nsUnicodeToBIG5NoAscii()
|
|
||||||
: nsTableEncoderSupport(u2BytesCharset,
|
|
||||||
(uMappingTable*) &g_ufBig5Mapping,
|
|
||||||
2 /* max length = src * 2 */)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsUnicodeToBIG5NoAscii::FillInfo(PRUint32 *aInfo)
|
|
||||||
{
|
|
||||||
nsresult rv = nsTableEncoderSupport::FillInfo(aInfo); // call the super class
|
|
||||||
if(NS_SUCCEEDED(rv))
|
|
||||||
{
|
|
||||||
// mark the first 128 bits as 0. 4 x 32 bits = 128 bits
|
|
||||||
aInfo[0] = aInfo[1] = aInfo[2] = aInfo[3] = 0;
|
|
||||||
}
|
|
||||||
return rv;
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToBIG5NoAscii_h___
|
|
||||||
#define nsUnicodeToBIG5NoAscii_h___
|
|
||||||
|
|
||||||
#include "nsUCSupport.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Class nsUnicodeToBIG5NoAscii [declaration]
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to BIG5NoAscii.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
class nsUnicodeToBIG5NoAscii : public nsTableEncoderSupport
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class constructor.
|
|
||||||
*/
|
|
||||||
nsUnicodeToBIG5NoAscii();
|
|
||||||
|
|
||||||
NS_IMETHOD FillInfo(PRUint32 *aInfo);
|
|
||||||
protected:
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToBIG5NoAscii_h___ */
|
|
@ -56,18 +56,6 @@ CPPSRCS = \
|
|||||||
nsUnicodeToEUCTW.cpp \
|
nsUnicodeToEUCTW.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
CPPSRCS += \
|
|
||||||
nsUnicodeToCNS11643p1.cpp \
|
|
||||||
nsUnicodeToCNS11643p2.cpp \
|
|
||||||
nsUnicodeToCNS11643p3.cpp \
|
|
||||||
nsUnicodeToCNS11643p4.cpp \
|
|
||||||
nsUnicodeToCNS11643p5.cpp \
|
|
||||||
nsUnicodeToCNS11643p6.cpp \
|
|
||||||
nsUnicodeToCNS11643p7.cpp \
|
|
||||||
$(NULL)
|
|
||||||
endif
|
|
||||||
|
|
||||||
#SHARED_LIBRARY_LIBS = $(DIST)/lib/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX)
|
#SHARED_LIBRARY_LIBS = $(DIST)/lib/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX)
|
||||||
|
|
||||||
LOCAL_INCLUDES = -I$(srcdir)/../util
|
LOCAL_INCLUDES = -I$(srcdir)/../util
|
||||||
|
@ -50,37 +50,4 @@
|
|||||||
#define NS_UNICODETOEUCTW_CID \
|
#define NS_UNICODETOEUCTW_CID \
|
||||||
{ 0x379c2776, 0xec77, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
|
{ 0x379c2776, 0xec77, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
|
||||||
|
|
||||||
|
|
||||||
#ifdef MOZ_EXTRA_X11CONVERTERS
|
|
||||||
// Class ID for our UnicodeToCNS11643p1 charset converter
|
|
||||||
// {BA615197-1DFA-11d3-B3BF-00805F8A6670}
|
|
||||||
#define NS_UNICODETOCNS11643P1_CID \
|
|
||||||
{ 0xba615197, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToCNS11643p2 charset converter
|
|
||||||
// {BA615198-1DFA-11d3-B3BF-00805F8A6670}
|
|
||||||
#define NS_UNICODETOCNS11643P2_CID \
|
|
||||||
{ 0xba615198, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToCNS11643p3 charset converter
|
|
||||||
#define NS_UNICODETOCNS11643P3_CID \
|
|
||||||
{ 0x9416bfb5, 0x1f93, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToCNS11643p4 charset converter
|
|
||||||
#define NS_UNICODETOCNS11643P4_CID \
|
|
||||||
{ 0x9416bfb6, 0x1f93, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToCNS11643p5 charset converter
|
|
||||||
#define NS_UNICODETOCNS11643P5_CID \
|
|
||||||
{ 0x9416bfb7, 0x1f93, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToCNS11643p6 charset converter
|
|
||||||
#define NS_UNICODETOCNS11643P6_CID \
|
|
||||||
{ 0x9416bfb8, 0x1f93, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
|
|
||||||
// Class ID for our UnicodeToCNS11643p7 charset converter
|
|
||||||
#define NS_UNICODETOCNS11643P7_CID \
|
|
||||||
{ 0x9416bfb9, 0x1f93, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* nsUCvTW2CID_h___ */
|
#endif /* nsUCvTW2CID_h___ */
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToCNS11643p1.h"
|
|
||||||
#include "nsUCvTW2Dll.h"
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Class nsUnicodeToCNS11643p1 [implementation]
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p1Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateTableEncoder(u2BytesCharset,
|
|
||||||
(uMappingTable*) &g_ufCNS1MappingTable,
|
|
||||||
2 /* max length = src * 2 */,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToCNS11643p1_h___
|
|
||||||
#define nsUnicodeToCNS11643p1_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to CNS11643p1.
|
|
||||||
*
|
|
||||||
* @created 06/Apr/1999
|
|
||||||
* @author Catalin Rotaru [CATA]
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p1Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToCNS11643p1_h___ */
|
|
@ -1,55 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToCNS11643p2.h"
|
|
||||||
#include "nsUCvTW2Dll.h"
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p2Constructor(nsISupports* aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateTableEncoder(u2BytesCharset,
|
|
||||||
(uMappingTable*) &g_ufCNS2MappingTable,
|
|
||||||
2 /* max length = src * 2 */,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToCNS11643p2_h___
|
|
||||||
#define nsUnicodeToCNS11643p2_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to CNS11643p2.
|
|
||||||
*
|
|
||||||
* @created 06/Apr/1999
|
|
||||||
* @author Catalin Rotaru [CATA]
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p2Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToCNS11643p2_h___ */
|
|
@ -1,55 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToCNS11643p3.h"
|
|
||||||
#include "nsUCvTW2Dll.h"
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p3Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateTableEncoder(u2BytesCharset,
|
|
||||||
(uMappingTable*) &g_ufCNS3MappingTable,
|
|
||||||
2 /* max length = src * 2 */,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToCNS11643p3_h___
|
|
||||||
#define nsUnicodeToCNS11643p3_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to CNS11643p3.
|
|
||||||
*
|
|
||||||
* @created 06/Apr/1999
|
|
||||||
* @author Catalin Rotaru [CATA]
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p3Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToCNS11643p3_h___ */
|
|
@ -1,55 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToCNS11643p4.h"
|
|
||||||
#include "nsUCvTW2Dll.h"
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p4Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateTableEncoder(u2BytesCharset,
|
|
||||||
(uMappingTable*) &g_ufCNS4MappingTable,
|
|
||||||
2 /* max length = src * 2 */,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToCNS11643p4_h___
|
|
||||||
#define nsUnicodeToCNS11643p4_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to CNS11643p4.
|
|
||||||
*
|
|
||||||
* @created 06/Apr/1999
|
|
||||||
* @author Catalin Rotaru [CATA]
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p4Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToCNS11643p4_h___ */
|
|
@ -1,54 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToCNS11643p5.h"
|
|
||||||
#include "nsUCvTW2Dll.h"
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p5Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateTableEncoder(u2BytesCharset,
|
|
||||||
(uMappingTable*) &g_ufCNS5MappingTable,
|
|
||||||
2 /* max length = src * 2 */,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToCNS11643p5_h___
|
|
||||||
#define nsUnicodeToCNS11643p5_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to CNS11643p5.
|
|
||||||
*
|
|
||||||
* @created 06/Apr/1999
|
|
||||||
* @author Catalin Rotaru [CATA]
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p5Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToCNS11643p5_h___ */
|
|
@ -1,54 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToCNS11643p6.h"
|
|
||||||
#include "nsUCvTW2Dll.h"
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p6Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateTableEncoder(u2BytesCharset,
|
|
||||||
(uMappingTable*) &g_ufCNS6MappingTable,
|
|
||||||
2 /* max length = src * 2 */,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToCNS11643p6_h___
|
|
||||||
#define nsUnicodeToCNS11643p6_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to CNS11643p6.
|
|
||||||
*
|
|
||||||
* @created 06/Apr/1999
|
|
||||||
* @author Catalin Rotaru [CATA]
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p6Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToCNS11643p6_h___ */
|
|
@ -1,54 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#include "nsUnicodeToCNS11643p7.h"
|
|
||||||
#include "nsUCvTW2Dll.h"
|
|
||||||
#include "nsUCConstructors.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Global functions and data [declaration]
|
|
||||||
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p7Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult)
|
|
||||||
{
|
|
||||||
return CreateTableEncoder(u2BytesCharset,
|
|
||||||
(uMappingTable*) &g_ufCNS7MappingTable,
|
|
||||||
2 /* max length = src * 2 */,
|
|
||||||
aOuter, aIID, aResult);
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
|
||||||
*
|
|
||||||
* 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 Communicator client code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsUnicodeToCNS11643p7_h___
|
|
||||||
#define nsUnicodeToCNS11643p7_h___
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A character set converter from Unicode to CNS11643p7.
|
|
||||||
*
|
|
||||||
* @created 06/Apr/1999
|
|
||||||
* @author Catalin Rotaru [CATA]
|
|
||||||
*/
|
|
||||||
NS_METHOD
|
|
||||||
nsUnicodeToCNS11643p7Constructor(nsISupports *aOuter, REFNSIID aIID,
|
|
||||||
void **aResult);
|
|
||||||
|
|
||||||
#endif /* nsUnicodeToCNS11643p7_h___ */
|
|
Loading…
Reference in New Issue
Block a user