forked from len0rd/rockbox
Type 1 text encoding uses BOM to decide byte order, type 2 has no BOM and is BE.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31349 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ae90b29dcb
commit
6aa070268f
1 changed files with 7 additions and 4 deletions
|
|
@ -1007,14 +1007,17 @@ void setid3v2title(int fd, struct mp3entry *entry)
|
||||||
char_enc = CHAR_ENC_ISO_8859_1;
|
char_enc = CHAR_ENC_ISO_8859_1;
|
||||||
break;
|
break;
|
||||||
case 0x01:
|
case 0x01:
|
||||||
char_enc = CHAR_ENC_UTF_16_LE;
|
if (memcmp(tag, "\1\xfe\xff", 3))
|
||||||
/* \1 + \xff\xfe + C\0U\0E\0S\0H\0E\0E\0T\0\0\0 = 21 */
|
char_enc = CHAR_ENC_UTF_16_BE;
|
||||||
|
else if (memcmp(tag, "\1\xff\xfe", 3))
|
||||||
|
char_enc = CHAR_ENC_UTF_16_LE;
|
||||||
|
/* \1 + BOM(2) + C0U0E0S0H0E0E0T000 = 21 */
|
||||||
cuesheet_offset = 21;
|
cuesheet_offset = 21;
|
||||||
break;
|
break;
|
||||||
case 0x02:
|
case 0x02:
|
||||||
char_enc = CHAR_ENC_UTF_16_BE;
|
char_enc = CHAR_ENC_UTF_16_BE;
|
||||||
/* \2 + \xfe\xff + \0C\0U\0E\0S\0H\0E\0E\0T\0\0 = 21 */
|
/* \2 + 0C0U0E0S0H0E0E0T00 = 19 */
|
||||||
cuesheet_offset = 21;
|
cuesheet_offset = 19;
|
||||||
break;
|
break;
|
||||||
case 0x03:
|
case 0x03:
|
||||||
char_enc = CHAR_ENC_UTF_8;
|
char_enc = CHAR_ENC_UTF_8;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue