Develop and Download Open Source Software

Browse Subversion Repository

Contents of /CopalPro/KCodeConv.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download) (as text)
Thu Jul 28 09:05:52 2011 UTC (12 years, 9 months ago) by kaityo
File MIME type: text/x-chdr
File size: 1541 byte(s)
First Commit
1 //---------------------------------------------------------------------------
2 #ifndef KCodeConvH
3 #define KCodeConvH
4 //---------------------------------------------------------------------------
5
6 enum delimiter {D_LF=0,D_CR,D_CRLF};
7 enum code {C_SJIS=0,C_EUC,C_JIS,C_UTF8};
8
9 class KCodeConv{
10 private:
11 static char * CodeChar[];
12 static char * DelimiterChar[];
13 static bool bNKF32Exists;
14 static HINSTANCE hNKF32;
15
16 static int GetFileSize(char *filename);
17
18 public:
19 static bool CheckNKF32(void);
20 static void FreeNKF32(void);
21 static bool NKF32Exists(void){
22 return bNKF32Exists;
23 };
24
25 static int GetCodeType(char *filename);
26 static int GetDelimiterType(char *filename);
27 static void ConvertCode(TMemoryStream *ms,char *inbuf,int CodeType);
28 static AnsiString GetConvertOption(int FromCode, int ToCode);
29 static AnsiString GetURLEncodedText(AnsiString inText,int CodeType);//URLエンコード
30 static void Convert(char *inbuf,char *buf,char *option);
31 static void ConvertDelimiter(TMemoryStream *ms,int Type);
32 static void ConvertStream(TMemoryStream *msIn,TMemoryStream *msOut,char *option);
33 static void SaveConvertedFile(AnsiString FileName,AnsiString Text,int ctype, int dtype);
34 static int GetKanjiCode(void);
35
36 //インタフェース
37 static char* GetCodeChar(int type){
38 return CodeChar[type];
39 };
40
41 static char* GetDelimiterChar(int type){
42 return DelimiterChar[type];
43 };
44 };
45 //---------------------------------------------------------------------------
46 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26