void THtmlLxChDef::SetUcCh(const TStr& Str){ // set type of characters as letters SetChTy(hlctAlpha, Str); // first char in string is upper-case, rest are lower-case for (int ChN=1; ChN<Str.Len(); ChN++){ SetUcCh(Str[0], Str[ChN]); } }
TLxChDef::TLxChDef(const TLxChDefTy& ChDefTy): ChTyV(TCh::Vals), UcChV(TCh::Vals){ if (ChDefTy==lcdtUsAscii){ // Character-Types ChTyV.PutAll(TInt(lctSpace)); SetChTy(lctNum, "0123456789"); SetChTy(lctAlpha, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); SetChTy(lctAlpha, "abcdefghijklmnopqrstuvwxyz"); SetChTy(lctAlpha, "@_"); SetChTy(lctSSym, "\"'.,:;+-*/%!#|&<=>?()[]{}"); SetChTy(lctTerm, TStr(TCh::CrCh)); SetChTy(lctTerm, TStr(TCh::LfCh)); SetChTy(lctTerm, TStr(TCh::EofCh)); // Upper-Case for (int Ch=TCh::Mn; Ch<=TCh::Mx; Ch++){UcChV[Ch-TCh::Mn]=TCh(char(Ch));} SetUcCh("Aa"); SetUcCh("Bb"); SetUcCh("Cc"); SetUcCh("Dd"); SetUcCh("Ee"); SetUcCh("Ff"); SetUcCh("Gg"); SetUcCh("Hh"); SetUcCh("Ii"); SetUcCh("Jj"); SetUcCh("Kk"); SetUcCh("Ll"); SetUcCh("Mm"); SetUcCh("Nn"); SetUcCh("Oo"); SetUcCh("Pp"); SetUcCh("Qq"); SetUcCh("Rr"); SetUcCh("Ss"); SetUcCh("Tt"); SetUcCh("Uu"); SetUcCh("Vv"); SetUcCh("Ww"); SetUcCh("Xx"); SetUcCh("Yy"); SetUcCh("Zz"); } else if (ChDefTy==lcdtYuAscii){ // Character-Types ChTyV.PutAll(TInt(lctSpace)); SetChTy(lctNum, "0123456789"); SetChTy(lctAlpha, "ABC^]D\\EFGHIJKLMNOPQRS[TUVWXYZ@"); SetChTy(lctAlpha, "abc~}d|efghijklmnopqrs{tuvwxyz`"); SetChTy(lctAlpha, "_"); SetChTy(lctSSym, "\".,:;+-*/%!#&<=>?()"); SetChTy(lctTerm, TStr(TCh::CrCh)); SetChTy(lctTerm, TStr(TCh::LfCh)); SetChTy(lctTerm, TStr(TCh::EofCh)); // Upper-Case for (int Ch=TCh::Mn; Ch<=TCh::Mx; Ch++){UcChV[Ch-TCh::Mn]=TCh(char(Ch));} SetUcCh("Aa"); SetUcCh("Bb"); SetUcCh("Cc"); SetUcCh("^~"); SetUcCh("]}"); SetUcCh("Dd"); SetUcCh("\\|"); SetUcCh("Ee"); SetUcCh("Ff"); SetUcCh("Gg"); SetUcCh("Hh"); SetUcCh("Ii"); SetUcCh("Jj"); SetUcCh("Kk"); SetUcCh("Ll"); SetUcCh("Mm"); SetUcCh("Nn"); SetUcCh("Oo"); SetUcCh("Pp"); SetUcCh("Qq"); SetUcCh("Rr"); SetUcCh("Ss"); SetUcCh("[{"); SetUcCh("Tt"); SetUcCh("Uu"); SetUcCh("Vv"); SetUcCh("Ww"); SetUcCh("Xx"); SetUcCh("Yy"); SetUcCh("Zz"); SetUcCh("@`"); } else { Fail; } }
TSqlDmChDef::TSqlDmChDef(): ChTyV(TUCh::Vals), UcChV(TUCh::Vals){ // Character-Types ChTyV.PutAll(TInt(dmctUndef)); SetChTy(dmctLetter, "ABCDEFGHIJKLMNOPQRSTUVWXYZ_"); SetChTy(dmctLetter, "abcdefghijklmnopqrstuvwxyz"); SetChTy(dmctDigit, "0123456789"); SetChTy(dmctSpace, " \t\r\n"); SetChTy(dmctEof, TCh::EofCh); // Upper-Case for (int Ch=0; Ch<=TUCh::Mx; Ch++){UcChV[Ch]=uchar(Ch);} SetUcCh("Aa"); SetUcCh("Bb"); SetUcCh("Cc"); SetUcCh("Dd"); SetUcCh("Ee"); SetUcCh("Ff"); SetUcCh("Gg"); SetUcCh("Hh"); SetUcCh("Ii"); SetUcCh("Jj"); SetUcCh("Kk"); SetUcCh("Ll"); SetUcCh("Mm"); SetUcCh("Nn"); SetUcCh("Oo"); SetUcCh("Pp"); SetUcCh("Qq"); SetUcCh("Rr"); SetUcCh("Ss"); SetUcCh("Tt"); SetUcCh("Uu"); SetUcCh("Vv"); SetUcCh("Ww"); SetUcCh("Xx"); SetUcCh("Yy"); SetUcCh("Zz"); }
THtmlLxChDef::THtmlLxChDef(): ChTyV(TCh::Vals), UcChV(TCh::Vals), LcChV(TCh::Vals), EscStrH(100){ // Character-Types ChTyV.PutAll(TInt(hlctSpace)); SetChTy(hlctAlpha, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); SetChTy(hlctAlpha, "abcdefghijklmnopqrstuvwxyz"); SetChTy(hlctAlpha, "@_"); SetChTy(hlctNum, "0123456789"); SetChTy(hlctSym, "`~!#$%^&*()-=+[{]}\\|;:'\",<.>/?"); SetChTy(hlctLTag, "<"); SetChTy(hlctRTag, ">"); SetChTy(hlctEof, TStr(TCh::EofCh)); //for (int Ch=TCh::Mn; Ch<=TCh::Mx; Ch++){ // if ((Ch<0)||(127<Ch)){SetChTy(hlctAlpha, TStr(TCh(char(Ch))));}} //SetChTy(hlctSpace, TStr(TCh(char(160)))); // Upper-Case {for (int Ch=TCh::Mn; Ch<=TCh::Mx; Ch++){ SetUcCh(char(Ch), char(Ch));}} SetUcCh("Aa"); SetUcCh("Àà"); SetUcCh("Áá"); SetUcCh("Ââ"); SetUcCh("Ãã"); SetUcCh("Ää"); SetUcCh("Åå"); SetUcCh("Ææ"); SetUcCh("Bb"); SetUcCh("Cc"); SetUcCh("Çç"); SetUcCh("Dd"); SetUcCh("Ðð"); SetUcCh("Ee"); SetUcCh("Èè"); SetUcCh("Éé"); SetUcCh("Êê"); SetUcCh("Ëë"); SetUcCh("Ff"); SetUcCh("Gg"); SetUcCh("Hh"); SetUcCh("Ii"); SetUcCh("Ìì"); SetUcCh("Íí"); SetUcCh("Îî"); SetUcCh("Ïï"); SetUcCh("Jj"); SetUcCh("Kk"); SetUcCh("Ll"); SetUcCh("Mm"); SetUcCh("Nn"); SetUcCh("Ññ"); SetUcCh("Oo"); SetUcCh("Òò"); SetUcCh("Óó"); SetUcCh("Ôô"); SetUcCh("Õõ"); SetUcCh("Öö"); SetUcCh("Øø"); SetUcCh("Pp"); SetUcCh("Qq"); SetUcCh("Rr"); SetUcCh("Ss"); SetUcCh("Šš"); SetUcCh("Tt"); SetUcCh("Uu"); SetUcCh("Ùù"); SetUcCh("Úú"); SetUcCh("Ûû"); SetUcCh("Üü"); SetUcCh("Vv"); SetUcCh("Ww"); SetUcCh("Xx"); SetUcCh("Yyÿ"); SetUcCh("Ýý"); SetUcCh("Zz"); SetUcCh("Žž"); // ISO-CE //SetUcCh(uchar(169), uchar(185)); /*Sh - ©¹*/ //SetUcCh(uchar(174), uchar(190)); /*Zh - ®¾*/ //SetUcCh(uchar(200), uchar(232)); /*Ch - Èè*/ //SetUcCh(uchar(198), uchar(230)); /*Cs - Ææ*/ //SetUcCh(uchar(208), uchar(240)); /*Dz - Ðð*/ // Annoying Unicode-characters SetChTy(hlctSpace, "Âï"); // Escape-Sequences SetEscStr(""", "\""); SetEscStr("&", "&"); SetEscStr("<", "<"); SetEscStr(">", ">"); SetEscStr(" ", " "); SetEscStr("ä", "ä"); SetEscStr("Ä", "Ä"); SetEscStr("ö", "ö"); SetEscStr("Ö", "Ö"); SetEscStr("ü", "ü"); SetEscStr("Ü", "Ü"); SetEscStr("å", "å"); SetEscStr("Å", "Å"); SetEscStr("ø", "ø"); SetEscStr("Ø", "Ø"); SetEscStr("&Aelig", "Æ"); SetEscStr("æ", "æ"); SetEscStr("é", "e"); SetEscStr("É", "E"); SetEscStr("è", "e"); SetEscStr("È", "E"); SetEscStr("à", "a"); SetEscStr("À", "A"); }