Ape tags, includes and portability

Scott Wheeler wheeler at kde.org
Thu Jul 20 01:51:12 CEST 2006


On Tuesday 18 July 2006 16:57, mETz wrote:

> Ok, so if I understand this correctly we would have
>
> - File::File(const char *file)
>
> which either takes utf-8 or ansi names on windows depending on the setting
> made by the application. How will this work on unix? At least with Qt you
> can either pass file.toLocal8Bit() or file.utf8() to this constructor so I
> see a similar problem to ansi vs. utf-8 on unix-systems.

There is no "ansi vs utf-8" issue on UNIX.  They're just a stream of bytes 
that happen to point to a file.  TagLib takes a string of bytes (const char 
*) in the local encoding and passes it on to fopen() untouched.

> And we would have
>
> - File::File(const wchar *file)
>
> which always takes utf-16 on every OS.

Well, I'd probably disable it on UNIX since it would only cause confusion...

-Scott

-- 
For a successful technology, reality must take precedence over public 
relations, for nature cannot be fooled. 
--Richard Feynman


More information about the taglib-devel mailing list