PDA

View Full Version : FLAC tags and international characters.



Dolf Dijkstra
2004-05-12, 02:35
I have this same issue. I made a previous post
http://thread.gmane.org/gmane.music.equipment.slimdevices.general/5857).

As far as I know are the flac (ogg) comments UTF-8. This means that flac
is capable of storing extended characters.

Next step where it could break is slim in handling on the characters, If
they expect iso8859 (latin-1) in flac comments then here the
byte-to-char conversion would break, assume that they use flac comments
and not the mp3 tags.

Next step is the build in slim webserver, It outputs iso-8859 encoded
bytes, or that is what it tells the browser. Actually it tells nothing
to the browser in the HTTP header, so the browser defaults to iso-8859
and in the html it explicitly sets the charset to iso-8859. In the past
I made slim indicate that it sends UTF-8 to the browser. That worked for
some parts of the skin (the extended characters were displayed
correctly), but in other place the skin completely broke. (did not
render at all). But this test was on 5.1 with the 'old' template engine.

The last step is the font in the browser. Any character needs a glyph (a
graphitic representation of a character) to be displayed in the browser.
If you see squared boxes in your browser, this is most likely because
the font that is selected to display the characters in the html page
does not have the glyph for the character.

I have not noticed the square boxes as you, but I have seen that the
browser displayed the extended characters incorrectly as multiple
characters. This would indicate that the data send by slim is not
correctly (according to the specified character set),

IMHO changing the flac comments by replacing the extended characters by
ascii is not a good way out.

Cheers

Dolf

-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Pat Farrell
Sent: Tuesday, May 11, 2004 11:47 PM
To: Slim Devices Discussion
Subject: [slim] FLAC tags and international characters.


At 05:19 PM 5/11/2004, you wrote:


FLAC files with accented or other international characters in their tags
show up bizarrely on both my SqueezeBox and the web interface. As an
example Fauré shows up as Faur**, where ** are some odd glyphs. Now I
know the software can handle the characters properly as mp3 tags and
file names are displayed fine.
a) Am I being thick :) Have I just missed something?


Nope, its a feature.
For example, I had
Andres Segovia tagged as Andrés Segovia. And the é causes problems



b) Is it because FLAC uses unicode for it's tags?


I'm not sure it is really Unicode as much as non-American characters.



c) Is there something I can do about it?


Go to my SlimServer-oriented utility page and look at the stuff for
flac.
http://www.pfarrell.com/music/slimsoftware.html
The "strange" command will at least identify files with FLAC tags
(really Ogg tags) that are likely to cause problems.

I tweaked the "bad" files by hand, altho you clearly could
expect a program like mine to actually fix them for you :-)

Pat