use POLLIN instead of POLLPRI for clip buffer empty
[enigma2.git] / lib / base / estring.cpp
index c5076a807eec16b562fb11cf70d10c7b30d6fb65..be071454923ff6be1bc1f32fc61dbc96fbd6fa28 100644 (file)
@@ -383,9 +383,9 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
                        break;
                case 0x10:
                {
-//                     eDebug("(0x10)text encoded in ISO-8859-%d",n);
                        int n=(data[++i]<<8);
                        n |= (data[++i]);
+//                     eDebug("(0x10)text encoded in ISO-8859-%d",n);
                        ++i;
                        switch(n)
                        {
@@ -398,8 +398,9 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
                        }
                        break;
                }
-               case 0x11:
-                       eDebug("unsup. Basic Multilingual Plane of ISO/IEC 10646-1 enc.");
+               case 0x11: //  Basic Multilingual Plane of ISO/IEC 10646-1 enc  (UTF-16... Unicode)
+                       table = 65;
+                       tsidonid = 0;
                        ++i;
                        break;
                case 0x12:
@@ -427,8 +428,10 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
        bool useTwoCharMapping =
                tsidonid && encodingHandler.getTransponderUseTwoCharMapping(tsidonid);
 
-       if (useTwoCharMapping)
-               table = 64;
+       if (useTwoCharMapping) {
+               if (table == 5)
+                       table = 64;
+       }
 
        unsigned char res[2048];
        while (i < len)
@@ -436,8 +439,16 @@ std::string convertDVBUTF8(const unsigned char *data, int len, int table, int ts
                unsigned long code=0;
                if ( useTwoCharMapping && i+1 < len && (code=doVideoTexSuppl(data[i], data[i+1])) )
                        i+=2;
-               if (!code)
-                       code=recode(data[i++], table);
+               if (!code) {
+                       if (table == 65) { // unicode
+                               if (i+1 < len) {
+                                       code=(data[i] << 8) | data[i+1];
+                                       i += 2;
+                               }
+                       }
+                       else
+                               code=recode(data[i++], table);
+               }
                if (!code)
                        continue;
                                // Unicode->UTF8 encoding