mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
#include "convbase.h"
|
|
|
|
class CInccEucJIn : public CINetCodeConverter
|
|
{
|
|
private:
|
|
BOOL (CInccEucJIn::*m_pfnConv)(UCHAR tc);
|
|
BOOL (CInccEucJIn::*m_pfnCleanUp)();
|
|
UCHAR m_tcLeadByte; /* perserve the last lead byte */
|
|
|
|
public:
|
|
CInccEucJIn(UINT uCodePage, int nCodeSet);
|
|
~CInccEucJIn() {}
|
|
virtual HRESULT ConvertChar(UCHAR tc, int cchSrc=-1);
|
|
virtual BOOL CleanUp();
|
|
virtual int GetUnconvertBytes();
|
|
virtual DWORD GetConvertMode();
|
|
virtual void SetConvertMode(DWORD mode);
|
|
|
|
private:
|
|
void Reset();
|
|
BOOL ConvMain(UCHAR tc);
|
|
BOOL CleanUpMain();
|
|
BOOL ConvDoubleByte(UCHAR tc);
|
|
BOOL CleanUpDoubleByte();
|
|
BOOL ConvKatakana(UCHAR tc);
|
|
BOOL CleanUpKatakana();
|
|
};
|
|
|
|
class CInccEucJOut : public CINetCodeConverter
|
|
{
|
|
private:
|
|
BOOL m_fDoubleByte;
|
|
BYTE m_tcLeadByte;
|
|
DWORD _dwFlag;
|
|
WCHAR *_lpFallBack;
|
|
|
|
public:
|
|
CInccEucJOut(UINT uCodePage, int nCodeSet, DWORD dwFlag, WCHAR *lpFallBack);
|
|
~CInccEucJOut() {}
|
|
virtual HRESULT ConvertChar(UCHAR tc, int cchSrc=-1);
|
|
virtual BOOL CleanUp();
|
|
virtual int GetUnconvertBytes();
|
|
virtual DWORD GetConvertMode();
|
|
virtual void SetConvertMode(DWORD mode);
|
|
private:
|
|
void Reset();
|
|
};
|