Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Variables
nsGBKToUnicode.cpp File Reference
#include "nsGBKToUnicode.h"
#include "nsUCvCnDll.h"
#include "gbku.h"
#include "gbkuniq2b.ut"
#include "gb18030uniq2b.ut"
#include "gb180304bytes.ut"

Go to the source code of this file.

Classes

class  nsGBKUnique2BytesToUnicode
class  nsGB18030Unique2BytesToUnicode
class  nsGB18030Unique4BytesToUnicode

Defines

#define LEGAL_GBK_MULTIBYTE_FIRST_BYTE(c)   (UINT8_IN_RANGE(0x81, (c), 0xFE))
#define FIRST_BYTE_IS_SURROGATE(c)   (UINT8_IN_RANGE(0x90, (c), 0xFE))
#define LEGAL_GBK_2BYTE_SECOND_BYTE(c)   (UINT8_IN_RANGE(0x40, (c), 0x7E)|| UINT8_IN_RANGE(0x80, (c), 0xFE))
#define LEGAL_GBK_4BYTE_SECOND_BYTE(c)   (UINT8_IN_RANGE(0x30, (c), 0x39))
#define LEGAL_GBK_4BYTE_THIRD_BYTE(c)   (UINT8_IN_RANGE(0x81, (c), 0xFE))
#define LEGAL_GBK_4BYTE_FORTH_BYTE(c)   (UINT8_IN_RANGE(0x30, (c), 0x39))

Variables

static const PRInt16 g_2BytesShiftTable []
 A character set converter from GBK to Unicode.
static const PRUint16 g_utGBKUnique2Bytes []
static const PRUint16 g_utGB18030Unique2Bytes []
static const PRInt16 g_GB18030_4BytesShiftTable []
static const PRUint16 g_utGB18030Unique4Bytes []

Define Documentation

#define FIRST_BYTE_IS_SURROGATE (   c)    (UINT8_IN_RANGE(0x90, (c), 0xFE))

Definition at line 131 of file nsGBKToUnicode.cpp.

#define LEGAL_GBK_2BYTE_SECOND_BYTE (   c)    (UINT8_IN_RANGE(0x40, (c), 0x7E)|| UINT8_IN_RANGE(0x80, (c), 0xFE))

Definition at line 133 of file nsGBKToUnicode.cpp.

#define LEGAL_GBK_4BYTE_FORTH_BYTE (   c)    (UINT8_IN_RANGE(0x30, (c), 0x39))

Definition at line 139 of file nsGBKToUnicode.cpp.

#define LEGAL_GBK_4BYTE_SECOND_BYTE (   c)    (UINT8_IN_RANGE(0x30, (c), 0x39))

Definition at line 135 of file nsGBKToUnicode.cpp.

#define LEGAL_GBK_4BYTE_THIRD_BYTE (   c)    (UINT8_IN_RANGE(0x81, (c), 0xFE))

Definition at line 137 of file nsGBKToUnicode.cpp.

#define LEGAL_GBK_MULTIBYTE_FIRST_BYTE (   c)    (UINT8_IN_RANGE(0x81, (c), 0xFE))

Definition at line 129 of file nsGBKToUnicode.cpp.


Variable Documentation

Initial value:
 {
 0, u2BytesCharset,
 ShiftCell(0,0,0,0,0,0,0,0)
}

A character set converter from GBK to Unicode.

07/Sept/1999

Author:
Yueheng Xu, Yuehe.nosp@m.ng.X.nosp@m.u@int.nosp@m.el.c.nosp@m.om

Definition at line 50 of file nsGBKToUnicode.cpp.

Initial value:
 {
 0, u4BytesGB18030Charset,
 ShiftCell(0,0,0,0,0,0,0,0)
}

Definition at line 99 of file nsGBKToUnicode.cpp.

Definition at line 87 of file nsGBKToUnicode.cpp.

Definition at line 113 of file nsGBKToUnicode.cpp.

Definition at line 66 of file nsGBKToUnicode.cpp.