Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsHZToUnicode_h___
7 #define nsHZToUnicode_h___
9 #include "nsUCSupport.h"
10 #include "nsGBKConvUtil.h"
12 //----------------------------------------------------------------------
13 // Class nsHZToUnicode [declaration]
15 /**
16 * A character set converter from GBK to Unicode.
17 *
18 *
19 * @created 08/Sept/1999
20 * @author Yueheng Xu, Yueheng.Xu@intel.com
21 */
22 class nsHZToUnicode : public nsBufferDecoderSupport
23 {
24 public:
26 /**
27 * Class constructor.
28 */
29 nsHZToUnicode();
31 protected:
33 //--------------------------------------------------------------------
34 // Subclassing of nsDecoderSupport class [declaration]
35 NS_IMETHOD ConvertNoBuff(const char* aSrc, int32_t * aSrcLength,
36 char16_t *aDest, int32_t * aDestLength);
37 nsGBKConvUtil mUtil;
39 private:
40 int16_t mHZState;
41 uint32_t mRunLength; // length of a run of 8-bit GB-encoded characters
42 char mOddByte; // first byte of a multi-byte sequence from a previous buffer
44 };
46 #endif /* nsHZToUnicode_h___ */