[Vorbis] newlines in vorbis comments

Haxe haxe at pansensack.de
Fri Sep 17 12:36:20 PDT 2004


> I curious; why do you need newlines?
Oh, I have seen this too.
There seem to be some apps out there that offer you to enter a longer 
text, including newlines and all, into the COMMENT= field. And that 
sounds quite sensible to me.

I personally don't use this. But it would feel safer if I could handle 
these tags with vobiscomment without risking data loss.

The problem with vorbiscomment is the following.
The documentation says:
> -c commentfile
> Take comments from a file. The file is the same format as is output by
> the -l option;
But this is simply not true. The -l option can indeed generate output 
that can't be re-imported by the -c option. This is exactly the case 
when any exported comment contains a newline. This is because, whereas 
the internal representation of vorbistags may be binary-safe, the 
format of the commentfile is NOT binary-safe.

Therefore, I suggest to introduce two new options to vorbiscomment:
-e = export tags to a binary-safe format
-i = import tags binary-safe, expected format is like the output of -e

> However ´newline´ isn´t quite what you think it is (it is a
> different charachter on different platforms.  A Mac newline in an Ogg
> comment won´t work on a PC, etc....).  Newline isn´t a language
> charachter, it´s a platform-specific control-code.
Yes indeed, this is another issue. While the first point was a problem 
of vorbiscomment that applies to binary data in general, this problem 
is specially about newline characters and has nothing to do with 
vorbiscomment in particular.

But this can also be solved. The solution is more organizational that 
technical:

I'm writing this email on a unix-like system, and it will be read by 
people using other platforms. So obviously, you CAN have 
platform-independent newlines in email. This is possible because people 
using different platforms agreed over the allowed newline 
representations used in email. I think, the same could be achieved for 
vorbis tags.

Greetz,
Hauke Hachmann


More information about the Vorbis mailing list