summaryrefslogtreecommitdiffstats
path: root/apps/metadata/id3tags.c
diff options
context:
space:
mode:
authorNick Peskett <rockbox@peskett.co.uk>2011-12-20 08:15:36 +0000
committerNick Peskett <rockbox@peskett.co.uk>2011-12-20 08:15:36 +0000
commit1b781df59c1b61009f36b64876372a00411b8be0 (patch)
treedf4b5cceeadf560f084d43d683ebaab689fa805e /apps/metadata/id3tags.c
parentc24a36dd9d54f4f77fb40b63fba1c76bac764aa6 (diff)
downloadrockbox-1b781df59c1b61009f36b64876372a00411b8be0.tar.gz
rockbox-1b781df59c1b61009f36b64876372a00411b8be0.tar.bz2
rockbox-1b781df59c1b61009f36b64876372a00411b8be0.zip
Convert hard-coded unicode byte order mark values to constants.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31374 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/metadata/id3tags.c')
-rw-r--r--apps/metadata/id3tags.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/metadata/id3tags.c b/apps/metadata/id3tags.c
index edd58da3f5..dcb80347db 100644
--- a/apps/metadata/id3tags.c
+++ b/apps/metadata/id3tags.c
@@ -49,6 +49,7 @@
#include "metadata_common.h"
#endif
#include "metadata_parsers.h"
+#include "misc.h"
static unsigned long unsync(unsigned long b0,
unsigned long b1,
@@ -1008,10 +1009,13 @@ void setid3v2title(int fd, struct mp3entry *entry)
break;
case 0x01:
tag++;
- if (!memcmp(tag, "\xfe\xff", 2))
+ if (!memcmp(tag,
+ BOM_UTF_16_BE, BOM_UTF_16_SIZE)) {
char_enc = CHAR_ENC_UTF_16_BE;
- else if (!memcmp(tag, "\xff\xfe", 2))
+ } else if (!memcmp(tag,
+ BOM_UTF_16_LE, BOM_UTF_16_SIZE)) {
char_enc = CHAR_ENC_UTF_16_LE;
+ }
/* \1 + BOM(2) + C0U0E0S0H0E0E0T000 = 21 */
cuesheet_offset = 21;
break;