gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r19024 - Extractor/src/plugins


From: gnunet
Subject: [GNUnet-SVN] r19024 - Extractor/src/plugins
Date: Thu, 5 Jan 2012 22:06:06 +0100

Author: grothoff
Date: 2012-01-05 22:06:06 +0100 (Thu, 05 Jan 2012)
New Revision: 19024

Modified:
   Extractor/src/plugins/id3v24_extractor.c
Log:
LRN: fixing #2047, non-standard compliant id3v24 extractor with respect to 
character sets

Modified: Extractor/src/plugins/id3v24_extractor.c
===================================================================
--- Extractor/src/plugins/id3v24_extractor.c    2012-01-05 21:04:55 UTC (rev 
19023)
+++ Extractor/src/plugins/id3v24_extractor.c    2012-01-05 21:06:06 UTC (rev 
19024)
@@ -221,8 +221,16 @@
                      break;
                    case 0x01:
                      word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + 11],
-                                                              csize - 1, 
"UCS-2");
+                                                              csize - 1, 
"UTF-16");
                      break;
+                   case 0x02:
+                     word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + 11],
+                                                              csize - 1, 
"UTF-16BE");
+                     break;
+                   case 0x03:
+                     word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + 11],
+                                                              csize - 1, 
"UTF-8");
+                     break;
                    default:
                      /* bad encoding byte,
                         try to convert from iso-8859-1 */
@@ -256,8 +264,16 @@
                      break;
                    case 0x01:
                      word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + off],
-                                                              csize - off, 
"UCS-2");
+                                                              csize - off, 
"UTF-16");
                      break;
+                   case 0x02:
+                     word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + off],
+                                                              csize - off, 
"UTF-16BE");
+                     break;
+                   case 0x03:
+                     word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + off],
+                                                              csize - off, 
"UTF-8");
+                     break;
                    default:
                      /* bad encoding byte,
                         try to convert from iso-8859-1 */
@@ -278,8 +294,16 @@
                      break;
                    case 0x01:
                      word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + 16],
-                                                              csize - 6, 
"UCS-2");
+                                                              csize - 6, 
"UTF-16");
                      break;
+                   case 0x02:
+                     word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + 16],
+                                                              csize - 6, 
"UTF-16BE");
+                     break;
+                   case 0x03:
+                     word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + 16],
+                                                              csize - 6, 
"UTF-8");
+                     break;
                    default:
                      /* bad encoding byte,
                         try to convert from iso-8859-1 */
@@ -300,8 +324,16 @@
                      break;
                    case 0x01:
                      word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + 14],
-                                                              csize - 4, 
"UCS-2");
+                                                              csize - 4, 
"UTF-16");
                      break;
+                   case 0x02:
+                     word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + 14],
+                                                              csize - 4, 
"UTF-16BE");
+                     break;
+                   case 0x03:
+                     word = EXTRACTOR_common_convert_to_utf8 ((const char *) 
&data[pos + 14],
+                                                              csize - 4, 
"UTF-8");
+                     break;
                    default:
                      /* bad encoding byte,
                         try to convert from iso-8859-1 */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]