Unicode filenames on Windows
Scott Wheeler
wheeler at kde.org
Tue Nov 6 19:42:23 CET 2007
Lukáš Lalinský wrote:
> Well, the idea was to support both types, char* in the local encoding
> and wchar_t* in utf-16. But since the conversion could be done by a
> simple function without any information loss, I guess it's ok to
> support only wchar_t*. And at least it will force lazy developers to
> think about unicode if they still use ANSI encoded filenames. :)
>
If it's just a one-liner to do that on Windows that seems like a
reasonable solution. (With a comment in the docs about what that one
line is.) Alternatively there could be something like:
#if WINDOWS
class FileName
{
public:
FileName(const char *name);
FileName(const wchar_t *name);
...
};
#else
typedef const char * FileName
#endif
But I think the latter option would be overkill if it's really simple to
do the conversion on Windows.
-Scott
More information about the taglib-devel
mailing list