Hello Jan,

I assume the problem is that metaflac has no way of knowing the encoding that 
was provided on the command line, since it could literally be anything. The 
--no-utf8-convert option means that metaflac does nothing to the letters as 
they pass through, and then the problem becomes that the next program to read 
the tags has to assume the character set without any information. If the 
program reading the tags gets the character set wrong, then you see garbage.

It's possible that the "local charset" or "locale" will be the same on the 
command line and in the application interpreting the characters, but that's not 
always true.

Or, to put it another way, isn't the assumption that all tags in a FLAC file 
are UTF-8? Thus, if you provide LATIN2 and don't allow metaflac to convert, 
then it's sure to be garbage.

By the way, I can see the Czech letters properly in your email, because it has 
a header saying Content-Type: text/plain; charset="iso-8859-2" and my Mac uses 
that information to decode the characters correctly. Not that I can pronounce 
Czech properly, but it sure looks like some of my favorite movie titles…

I'm just guessing here, but I assume that the best way to handle this would be 
to provide the characters to metaflac in UTF-8 and not use that option (because 
it ignores the charset). Then the applications reading out the tags will know 
that they're UTF-8.

Obviously, if anyone has better procedures for this, please explain. I don't 
actually know whether this option is supposed to work on input, output, or both.

Brian


On Dec 5, 2014, at 11:16 AM, Jan Stary <[email protected]> wrote:
> This is 1.3.1 on OpenBSD/amd64.
> The --no-utf8-convert option of metaflac(1) does not work for me:
> 
> $ metaflac --no-utf8-convert --set-tag="Artist=Žoužlíček" aladin.flac
> aladin.flac: ERROR: tag value for 'Artist' is not valid UTF-8
> (You probably can't see the Czech letters properly in my mail,
> but that's beside the point.)
> 
> Indeed, it is not valid UTF8 (it's LATIN2), but isn't metaflac
> supposed to just write it as specified, with this option?
> 
_______________________________________________
Flac mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/flac

Reply via email to