From c72251596c42864a959aedd7d916e834aac276e9 Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Wed, 21 Nov 2012 09:11:04 +0100 Subject: Moved charset fixing code to a separate class Added setup option to enable/dissable charset fixing --- util.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index 4b3ce9b..bef2a3e 100644 --- a/util.h +++ b/util.h @@ -9,12 +9,14 @@ #define UTIL_H_ #include #include +#include class cChannel; struct tChannelID; class cEvent; class cEquivHandler; class cSchedules; +class cCharSetConv; #define START '\0' #define STOP '\0' @@ -94,5 +96,22 @@ extern struct hufftab *tables[2][128]; extern int table_size[2][128]; //static sNodeH* sky_tables[2]; +class cCharsetFixer +{ +public: + cCharsetFixer(); + virtual ~cCharsetFixer(); + const char* FixCharset(const char* text); + void InitCharsets(const cChannel* Channel); + +private: + cCharSetConv* conv_revert;//("UTF-8",CharsetOverride); + cCharSetConv* conv_to;//(fixCharset.c_str()); + const char* charsetOverride; + std::string fixedCharset; + std::string initialCharset; + +}; + } #endif /* UTIL_H_ */ -- cgit v1.2.3