[Vorbis] newlines in vorbis comments

Ian Malone ibm21 at cam.ac.uk
Fri Sep 17 19:34:33 PDT 2004


On Sat, 2004-09-18 at 00:04, Monty wrote:
> 
> On Fri, Sep 17, 2004 at 06:26:30PM -0400, Greg Wooledge wrote:

> > 
> > But the intuitive way to retrieve the tags from an Ogg Vorbis file is
> > to dump them to standard output with newlines between them.  When this
> > is done (e.g. by vorbiscomment -l), then there's no way to distinguish
> > between a newline inside a tag, and a new tag.
> > 
> > Perhaps you could take a hint from xargs(1) and add a "-0" option to
> > vorbiscomment, which would separate tags with NUL characters instead
> > of newlines.  If that's not flexible enough, the user could specify
> > a comment delimiter on the command line.  It looks like "-d" is free
> > for this purpose.
> 
> Tags are not ASCII; they´re UTF-8.  

A C-style NUL delimiter would work, since \0 in a UTF-8 stream cannot
be part of a multi-byte sequence.  ASCII or UTF-8 the problem with
delimiters is the one Haxe points out.  This is the reason I thought
of using a file containing a single tag value.  Thinking about -t
a little more, I realised cat will let me do this.  In short, sorry
to bother you all.

I should point out I was never proposing an addition to vorbiscomment.
As Monty suggested by asking what this is for, multi-line tag values
have little real use.  It might be worth a warning in vorbiscomment
if tags can't be safely round tripped though (if it contains LF, CR
or NUL.)

> 
> As for having multiple tags, the spec supports that.  No reason for odd hacking.
> 

I'm not sure if this is directed at my statement about Easytag not
supporting multiple tags [1], or the quoted poster.  If at me
then I'll clarify that I use multiple tags, and I don't use Easytag
because it didn't support properly when I tried it.

[1] I should be clear that it's a while since I've used it.

-- 
imalone



More information about the Vorbis mailing list