id3 tag general issues
Joe Wreschnig
piman at sacredchao.net
Sun Jul 2 07:04:15 CEST 2006
On Sat, 2006-07-01 at 19:47 -0700, Brian Kerrick Nickel wrote:
> Hi,
>
> I'm not so sure about the first issue, but the remainder I may be able
> to help explain.
>
>
> I am not sure if all strings in TextIdentification frames
> should be
> null terminated, because TagLib doesn't do so. I checked with
> some
> other Win32 tag editing programs. They do use null terminated
> strings.
>
> String are only null terminated when explicitly stated in the
> specifications. Otherwise they are only null separated. As all strings
> are null separated lists, appending a null terminator at the end would
> result in an empty string in the list. eg. "Foobar\0" -> { "Foobar",
> "" } or "Artist 1\0Artist 2\0" -> { "Artist 1", "Artist 2", "" }. This
> is bad behavior and doing so could cause files to be misread by other
> readers.
I've found the opposite. Readers can cope with null-terminated things,
and a small subset fails to work with non-terminated strings. Part of
this subset is cheap embedded players, where there's no chance to fix
the code. (Unfortunately the most recent time I had this discussion was
on the eyed3-devel list, which seems to not have public archives. So I
can't look up the name of the particular hardware that was giving us
trouble.)
This might be because very few readers are capable of processing
multiple values at all. Any readers that are processing multiple values
have to handle this case anyway though since it's how most taggers
write.
Since null termination doesn't do any harm, and only costs a single
character, I think it's a good idea.
--
Joe Wreschnig <piman at sacredchao.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20060702/988bd469/attachment.pgp
More information about the taglib-devel
mailing list