00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifdef _ICU_
00019
00020 #ifndef UTF8TRANSLITERATOR_H
00021 #define UTF8TRANSLITERATOR_H
00022
00023 enum scriptEnum {SE_OFF, SE_LATIN, SE_BASICLATIN, SE_BETA, SE_BGREEK, SE_GREEK, SE_HEBREW, SE_CYRILLIC, SE_ARABIC, SE_SYRIAC, SE_KATAKANA, SE_HIRAGANA, SE_JAMO, SE_HANGUL, SE_DEVANAGARI, SE_TAMIL, SE_BENGALI, SE_GURMUKHI, SE_GUJARATI, SE_ORIYA, SE_TELUGU, SE_KANNADA, SE_MALAYALAM, SE_THAI, SE_GEORGIAN, SE_ARMENIAN, SE_ETHIOPIC, SE_GOTHIC, SE_UGARITIC, SE_COPTIC, SE_HAN, SE_KANJI};
00024 #define NUMSCRIPTS 32
00025 #define NUMTARGETSCRIPTS 5
00026
00027 #include <swfilter.h>
00028 #include <swmodule.h>
00029
00030 #include <unicode/utypes.h>
00031 #include <unicode/ucnv.h>
00032 #include <unicode/ustring.h>
00033 #include <unicode/uchar.h>
00034
00035 #include <unicode/unistr.h>
00036 #include <unicode/translit.h>
00037
00038 #include <defs.h>
00039
00042 class SWDLLEXPORT UTF8Transliterator : public SWFilter
00043 {
00044 char option;
00045
00046 static const char optionstring[NUMTARGETSCRIPTS][16];
00047
00048 static const char optName[];
00049 static const char optTip[];
00050 OptionsList options;
00051
00052 public:
00053 UTF8Transliterator ();
00054 virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
00055 virtual const char *getOptionName ()
00056 {
00057 return optName;
00058 }
00059 virtual const char *getOptionTip ()
00060 {
00061 return optTip;
00062 }
00063 virtual void setOptionValue (const char *ival);
00064 virtual const char *getOptionValue ();
00065 virtual OptionsList getOptionValues ()
00066 {
00067 return options;
00068 }
00069 };
00070
00071 #endif
00072
00073 #endif