File::encodeName() and Utf8 as the default encoding under Qt5

Lubomir I. Ivanov neolit123 at
Wed Oct 29 09:18:14 PDT 2014

On 29 October 2014 18:02, Thiago Macieira <thiago at> wrote:
> On Wednesday 29 October 2014 17:32:58 Lubomir I. Ivanov wrote:
>> now, i know how to fix the issue by simply not use File::encodeName()
>> at all on Win32 and use QString::toUtf8() instead but is there a
>> cleaner way with no #ifdefs?
>> not sure if QTextCodec::setCodecForLocale() should be set to Utf8 on
>> Win32...
> Hmm... I'm not sure what will happen if you setCodecForLocale on Windows, I've
> never tried.

just tried setting it to UTF-8 and the filenames work again
but i really have no idea of the more global consequences of this. if
it breaks other important areas perhaps the attached patch should not
be applied.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-qt-qui.cpp-set-the-locale-codec-to-UTF-8-on-Win32.patch
Type: application/octet-stream
Size: 1042 bytes
Desc: not available
URL: <>

More information about the subsurface mailing list