Unicode filenames on Windows

Lukáš Lalinský lalinsky at gmail.com
Wed Nov 7 00:46:17 CET 2007


On Ut, 2007-11-06 at 19:42 +0100, Scott Wheeler wrote:
[...]
> #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.

The conversion is simple, but dealing with char* or wchar_t* always
means memory allocation issues. But I really like this class/typedef
solution, so I've updated the patch. It is source-code compatible
compatible with previous unofficial Windows versions, but has the
benefit of implicit wchar_t* support.

Lukas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: taglib-unicode-filenames.diff
Type: text/x-patch
Size: 16893 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20071107/0a38d9a8/attachment-0001.bin 


More information about the taglib-devel mailing list