[ID3 Dev] ID3v2.4.0 native frames

Ion Todirel iontodirel at yahoo.co.uk
Wed Aug 24 07:17:10 PDT 2005


Thanks again for help, 
 
John.

Ben Bennett <fiji at ayup.limey.net> wrote:
On Wed, Aug 24, 2005 at 01:42:19PM +0100, Ion Todirel wrote:
> Ben, look on this frame (or others):
> 
> 
> Text encoding $xx
> Language $xx xx xx
> Short content descrip. $00 (00)
> The actual text 
> 
> $00 is a byte (new byte(); (0)) separator between "Short content descrip." and "Text"?

The reason the terminator is specified as $00 (00) is that the
terminator may be one byte or it may be two depending on the encoding.
Section 4 of the "Main Structure" document
(http://www.id3.org/id3v2.4.0-structure.txt) outlines the rules:
$00 ISO-8859-1 [ISO-8859-1]. Terminated with $00.
$01 UTF-16 [UTF-16] encoded Unicode [UNICODE] with BOM. All
strings in the same frame SHALL have the same byteorder.
Terminated with $00 00.
$02 UTF-16BE [UTF-16] encoded Unicode [UNICODE] without BOM.
Terminated with $00 00.
$03 UTF-8 [UTF-8] encoded Unicode [UNICODE]. Terminated with $00.

So for encodings $00 and $03 the terminator is $00, and for $01 and
$02 (the wide character Unicode encodings) the terminator is $00 $00.

> For some frames is not specified String Encoding, for example for frame "WXXX":
> 
> <"WXXX">
> Text encoding $xx
> Description $00 (00)
> URL 
> 
> URL is Encoded with Latin1Encoding ("ISO-8859-1") ?
> 
> or for "UFID" frame, what encoding shuld use to decode "Identifier" from byte to string? "ISO-8859-1" ?

 From the same section of the spec:
If nothing else is said, strings, including numeric strings and URLs
[URL], are represented as ISO-8859-1 [ISO-8859-1] characters in the
range $20 - $FF. Such strings are represented in frame descriptions
as , or if newlines are allowed. If
nothing else is said newline character is forbidden. In ISO-8859-1 a
newline is represented, when allowed, with $0A only.

Note that in the WXXX case it should be URL encoded anyway.

Also note the rules about newlines and the distinction in the spec
between and .

The spec is unlear about what to do with newlines when the encoding is
not ISO-8859-1.

-ben

---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org


		
---------------------------------
Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with voicemail 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.id3.org/pipermail/id3v2/attachments/20050824/d9164655/attachment.html>


More information about the ID3v2 mailing list