Re: zinf and utf8

Robert Hart <[email protected]>
Newsgroups gmane.comp.audio.zinf.devel
Organization University of Nottingham
Message-ID <1060034473.965.268.camel@euclid>
On Mon, 2003-08-04 at 18:29, Kristian G. Kvilekval wrote:

> Internally, everything is US-ASCII.   There are several points
> where conversions are made (vorbis, id3tag, etc).  Of course,
> in usual style each uses its own set of conversion routines.
> One day I'll go back and clean out that part of the garage too.

That is untrue, I think. ASCII (using only 7bits per char), is a subset
of utf8. In other words any valid ascii string is valid in utf8. Now I
have mp3's by Björk and Saint-Saëns, amongst others, which contain
"funny" characters, which when displayed in my gtk2 based zinf gives an
error. This is because they are encoded in some kind of extended ascii
(prob. ISO-8859-1) which uses 8bits per character.

> I have no idea what this would entail.   Can you point me to a program
> that uses UTF8 internally.   What about constant strings, gettext
> internalization, and string manipulation commands.

Well, utf8 is designed to be as compatible as possible with ascii, but
you can't assume that 1 character equals one byte, because it uses a
variable amount of storage per character. So for example you can't
iterate through the character in a string just by incrementing a
pointer, etc. 

> We push so few strings to the display that it might be just as easy
> to do the conversions on the fly.

hmm, so when I add 5000 files to a playlist, with the musicbrowser
showing artist, album, title, genre, location, that's what 25,000
strings output in one go....

I guess I'll just try it and see what happens.

-- 
+-------------------------------------+
| "It's only a trap if you don't take |
| a ladder with you to get out of it" |
| 		-S Ring, Bath Uni     |
|                                     |
| [email protected]                   |
| http://www.nott.ac.uk/~enxrah       |
+-------------------------------------+





-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.