[music][metadata] Support non-Unicode text in ID3 tags

NEW
Unassigned

Status

Firefox OS
Gaia::Music
P1
normal
5 years ago
2 years ago

People

(Reporter: sync-1, Unassigned)

Tracking

(Blocks: 1 bug)

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:-, b2g18+ affected)

Details

(Whiteboard: c=)

Attachments

(3 attachments)

(Reporter)

Description

5 years ago
+++ This bug was initially created as a clone of Bug #407751 +++
 
 Created an attachment (id=347828)
 add picture 1
 
 CONTACT INFO (Name,Phone number):
 Huxia 6552
 
 DEFECT DESCRIPTION:
 Show mess code in music.
 
 REPRODUCING PROCEDURES:
 Show mess code in music.
 
 EXPECTED BEHAVIOUR:
 No mess code.
 
 ASSOCIATE SPECIFICATION:
 
 TEST PLAN REFERENCE:
 
 TOOLS AND PLATFORMS USED:
 v109
 
 USER IMPACT:
 
 REPRODUCING RATE:
 
 For FT PR, Please list reference mobile's behavior:
 
 ++++++++++ end of initial bug #407751 description ++++++++++
 
 
 
 CONTACT INFO (Name,Phone number):
 
 DEFECT DESCRIPTION:
 
 REPRODUCING PROCEDURES:
 
 EXPECTED BEHAVIOUR:
 
 ASSOCIATE SPECIFICATION:
 
 TEST PLAN REFERENCE:
 
 TOOLS AND PLATFORMS USED:
 
 USER IMPACT:
 
 REPRODUCING RATE:
 
 For FT PR, Please list reference mobile's behavior:

Updated

5 years ago
Duplicate of this bug: 850551
What is mess code?
Flags: needinfo?(sync-1)

Updated

5 years ago
Whiteboard: triaged

Comment 3

5 years ago
Created attachment 728839 [details]
mess code image

The page can only display utf-8 encoded string. However,the string reading from
the ID3 field of some mp3 files is based on GB2312 encoding.
Flags: needinfo?(sync-1)

Comment 4

5 years ago
Please see mess cose image

Updated

5 years ago
Priority: -- → P1
Thanks, I've clarified the summary a bit.
Summary: [Buri][Music player] Show mess code in music. → [Buri][Music player] Handle non-UTF-8 ID3 tags
I've heard that MP3's with non-Unicode text are common in Asia, but are non actually compliant with the ID3 specification (I haven't checked this recently, though). Anyone know how to tell what the encoding of an ID3 tag is?  What's the trick to tell if it is valid utf8 or GB2312?

And if we can identify a string as GB2312, how do we then display it correctly? Do we have to convert it to Unicode, or can we declare a charset for just a single element within an HTML document?  I think Gecko has new string conversion utilities, but I don't know if they're in b2g18 or if they're newer than that.

I wrote the current ID3 parser code, but am not really sure I'm qualified to take on this bug.  Anyone who is should look at apps/music/js/metadata.js and shared/js/blobview.js

Seting needinfo on the reporter to ask them to attach an MP3 file with this sort of ID3 tag for use in testing.
Flags: needinfo?(sync-1)
(In reply to David Flanagan [:djf] from comment #6)
> And if we can identify a string as GB2312, how do we then display it
> correctly? Do we have to convert it to Unicode, or can we declare a charset
> for just a single element within an HTML document?  I think Gecko has new
> string conversion utilities, but I don't know if they're in b2g18 or if
> they're newer than that.

Bug 764234 (String encoding/decoding API) was backported to b2g18 (from [1]):

  https://hg.mozilla.org/releases/mozilla-b2g18/rev/44ccc86fa232
  https://hg.mozilla.org/releases/mozilla-b2g18/rev/e94004b134a3

Not sure if that's sufficient for this purpose ...

[1]
https://bugzilla.mozilla.org/show_bug.cgi?id=814257#c43

Comment 8

5 years ago
Created attachment 730024 [details]
the ID3 noncoding UTF-8 MP3 file
Flags: needinfo?(sync-1)

Comment 9

5 years ago
Comment on attachment 730024 [details]
the ID3 noncoding UTF-8 MP3 file

the string of ID3 field is not encoded on Unicode.

Updated

5 years ago
blocking-b2g: --- → leo?
Please renom if this issue would block our v1.1 target markets - which are not in Asia - otherwise this is for a v-next.
blocking-b2g: leo? → -

Updated

5 years ago
blocking-b2g: - → tef?
(Reporter)

Comment 11

5 years ago
Created an attachment (id=390528)
 the song show mess code
 
 Other language also has mess code.
 
 And the mess code not only happen in chinese song, but also happen in English
 song.
Based on comment 6 I think this is not blocking 1.0.1 relaase as:

1/ It does not affect target markets
2/ It is not compliant with the standard
blocking-b2g: tef? → ---

Updated

5 years ago
Duplicate of this bug: 865540

Comment 14

5 years ago
Created attachment 742907 [details]
english song with mess code

Comment 15

5 years ago
(In reply to Daniel Coloma:dcoloma from comment #12)
> Based on comment 6 I think this is not blocking 1.0.1 relaase as:
> 
> 1/ It does not affect target markets
> 2/ It is not compliant with the standard

please refer to comment 11 and comment 14. english song also show mess code.
blocking-b2g: --- → tef?
My opinion is still the same, this is a corner case and we have bigger fish to fry. I would tef- but asking Moz for feedback.
Whiteboard: triaged → [tef-triage]
blocking-b2g: tef? → -
status-b2g18: --- → affected
tracking-b2g18: --- → +
Whiteboard: [tef-triage] → c=

Comment 17

5 years ago
(In reply to David Flanagan [:djf] from comment #6)
> I've heard that MP3's with non-Unicode text are common in Asia, but are non
> actually compliant with the ID3 specification (I haven't checked this
> recently, though). Anyone know how to tell what the encoding of an ID3 tag
> is?  What's the trick to tell if it is valid utf8 or GB2312?

I mentioned this at the work week, I think, but the way you'd tell if an id3 tag is using a non-standard encoding is to write a heuristic that detects the most likely encoding.

As far as I'm aware, this is really only an issue in Asian countries (Russia included). I believe this is very rare in European and American countries, so we can probably keep this a low priority until we launch a device in Asia.

Updated

5 years ago
Duplicate of this bug: 903935

Updated

5 years ago
See Also: → bug 841949

Comment 19

5 years ago
I discussed some strategies for handling this with :djf on IRC, and we both agreed that when implementing the heuristic to detect non-standard encodings, we should have some kind of pref stored in the Settings API that carriers can configure for each market. That way, this can be turned off entirely in American and European markets, so that we don't over-aggressively use the heuristic on standards-compliant id3 tags.

Updated

4 years ago
Blocks: 1065858

Updated

3 years ago
Duplicate of this bug: 1091997

Updated

3 years ago
Duplicate of this bug: 1104675

Updated

3 years ago
Duplicate of this bug: 1106464

Updated

3 years ago
See Also: → bug 1112963

Updated

3 years ago
Duplicate of this bug: 1112963

Updated

2 years ago
Summary: [Buri][Music player] Handle non-UTF-8 ID3 tags → [music][metadata] Support non-Unicode text in ID3 tags
You need to log in before you can comment on or make changes to this bug.