Unicode filenames on Windows

Linus Walleij linus.ml.walleij at gmail.com
Mon Nov 5 11:27:28 CET 2007


2007/11/5, Lukáš Lalinský <lalinsky at gmail.com>:

> having support for Unicode filename API is a must for any more serious
> usage on Windows, so I choose probably the only binary compatible way,
> that makes sense, to do it -- duplicating constructors of all
> TagLib::File subclasses to support also wchar_t* in addition to char*.

The way it works with other portable libs such as glib is that all filenames
are given in UTF-8 (char *), then converted inside the lib to wchar_t
* or whatever
is needed (native UTF-8 on POSIX systems e.g.). (iconv() does the trick
for you in any case).

However it will be a roundtrip in Windows since there will be many
wchar_t -> UTF-8 -> wchar_t conversions for no use, so perhaps this
proposal is better anyway.

Linus


More information about the taglib-devel mailing list