diff options
Diffstat (limited to 'src/plugins/id3v24_extractor.c')
-rw-r--r-- | src/plugins/id3v24_extractor.c | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/src/plugins/id3v24_extractor.c b/src/plugins/id3v24_extractor.c index 9055a7b..301020c 100644 --- a/src/plugins/id3v24_extractor.c +++ b/src/plugins/id3v24_extractor.c | |||
@@ -221,7 +221,15 @@ EXTRACTOR_id3v24_extract (const unsigned char *data, | |||
221 | break; | 221 | break; |
222 | case 0x01: | 222 | case 0x01: |
223 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 11], | 223 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 11], |
224 | csize - 1, "UCS-2"); | 224 | csize - 1, "UTF-16"); |
225 | break; | ||
226 | case 0x02: | ||
227 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 11], | ||
228 | csize - 1, "UTF-16BE"); | ||
229 | break; | ||
230 | case 0x03: | ||
231 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 11], | ||
232 | csize - 1, "UTF-8"); | ||
225 | break; | 233 | break; |
226 | default: | 234 | default: |
227 | /* bad encoding byte, | 235 | /* bad encoding byte, |
@@ -256,7 +264,15 @@ EXTRACTOR_id3v24_extract (const unsigned char *data, | |||
256 | break; | 264 | break; |
257 | case 0x01: | 265 | case 0x01: |
258 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + off], | 266 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + off], |
259 | csize - off, "UCS-2"); | 267 | csize - off, "UTF-16"); |
268 | break; | ||
269 | case 0x02: | ||
270 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + off], | ||
271 | csize - off, "UTF-16BE"); | ||
272 | break; | ||
273 | case 0x03: | ||
274 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + off], | ||
275 | csize - off, "UTF-8"); | ||
260 | break; | 276 | break; |
261 | default: | 277 | default: |
262 | /* bad encoding byte, | 278 | /* bad encoding byte, |
@@ -278,7 +294,15 @@ EXTRACTOR_id3v24_extract (const unsigned char *data, | |||
278 | break; | 294 | break; |
279 | case 0x01: | 295 | case 0x01: |
280 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 16], | 296 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 16], |
281 | csize - 6, "UCS-2"); | 297 | csize - 6, "UTF-16"); |
298 | break; | ||
299 | case 0x02: | ||
300 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 16], | ||
301 | csize - 6, "UTF-16BE"); | ||
302 | break; | ||
303 | case 0x03: | ||
304 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 16], | ||
305 | csize - 6, "UTF-8"); | ||
282 | break; | 306 | break; |
283 | default: | 307 | default: |
284 | /* bad encoding byte, | 308 | /* bad encoding byte, |
@@ -300,7 +324,15 @@ EXTRACTOR_id3v24_extract (const unsigned char *data, | |||
300 | break; | 324 | break; |
301 | case 0x01: | 325 | case 0x01: |
302 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 14], | 326 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 14], |
303 | csize - 4, "UCS-2"); | 327 | csize - 4, "UTF-16"); |
328 | break; | ||
329 | case 0x02: | ||
330 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 14], | ||
331 | csize - 4, "UTF-16BE"); | ||
332 | break; | ||
333 | case 0x03: | ||
334 | word = EXTRACTOR_common_convert_to_utf8 ((const char *) &data[pos + 14], | ||
335 | csize - 4, "UTF-8"); | ||
304 | break; | 336 | break; |
305 | default: | 337 | default: |
306 | /* bad encoding byte, | 338 | /* bad encoding byte, |