Ape tags, includes and portability

Lukáš Lalinský lalinsky at gmail.com
Tue Jul 18 14:36:04 CEST 2006

Sebastian Pipping wrote:
> My last mail regarding windows/linux portability
> for the official taglib code was ignored which
> is a "no" in my eyes. If this portability way
> is not wanted I can accept it and build the fourth
> windows port around but in my eyes this is not
> the best solution. The code would not really get
> more complicated than before: Here is an example line
> d->file = PORT_FOPEN(file, d->readOnly ? _PT("rb") : _PT("rb+"));
> which fully works on Unix, both Ansi and Unicode Windows.

Well, you need to compile two versions of the library in order to support both
Ansi and Unicode API on Windows, and can't use both in one application (for
compatibility reasons).

There are three ways how it could be done, with support for both APIs:

* Windows-like way of doing this would be having two
TagLib::File contructors, one for wchar*, one for char*.
* Glib-like way, and using UTF-8 for file names.
* And one more option would be using TagLib::String instead of char*.

I'd love to if TagLib 1.5 would include any of these solutions, but I really
don't like having it either Ansi-only or Unicode-only. In that case I'd have to
keep my own UTF-8 branch. :(

More information about the taglib-devel mailing list