diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-08-31 18:20:45 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-08-31 18:20:45 +0000 |
| commit | 4269ecde13580077c4d234b21784f704bf43e8fc (patch) | |
| tree | 424c0b80019cf49aac3421779902ffd9a2ab4ee2 /lib/base | |
| parent | 169755aa6f9823ece2c51e720dbc4de6131c9308 (diff) | |
| download | enigma2-4269ecde13580077c4d234b21784f704bf43e8fc.tar.gz enigma2-4269ecde13580077c4d234b21784f704bf43e8fc.zip | |
- fix character conversion for DVB
Diffstat (limited to 'lib/base')
| -rw-r--r-- | lib/base/estring.cpp | 8 | ||||
| -rw-r--r-- | lib/base/estring.h | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/base/estring.cpp b/lib/base/estring.cpp index f0107b6a..aee17429 100644 --- a/lib/base/estring.cpp +++ b/lib/base/estring.cpp @@ -3,6 +3,7 @@ #include <limits.h> #include <lib/base/elock.h> #include <lib/base/eerror.h> +#include <lib/base/estring.h> static pthread_mutex_t lock=PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP; @@ -181,7 +182,12 @@ static inline unsigned int recode(unsigned char d, int cp) } } -std::string convertDVBUTF8(unsigned char *data, int len, int table) +std::string convertDVBUTF8(const std::string &s, int table) +{ + return convertDVBUTF8((const unsigned char*)s.c_str(), s.size(), table); +} + +std::string convertDVBUTF8(const unsigned char *data, int len, int table) { int i; if (!len) diff --git a/lib/base/estring.h b/lib/base/estring.h index 9cc3180f..a0b161de 100644 --- a/lib/base/estring.h +++ b/lib/base/estring.h @@ -9,8 +9,9 @@ int strnicmp(const char*, const char*, int); std::string getNum(int num, int base=10); -std::string convertDVBUTF8(unsigned char *data, int len, int table=5); +std::string convertDVBUTF8(const unsigned char *data, int len, int table=5); std::string convertUTF8DVB(const std::string &string); // with default ISO8859-5 +std::string convertDVBUTF8(const std::string &s, int table=5); std::string convertLatin1UTF8(const std::string &string); int isUTF8(const std::string &string); |
