Always use UTF-8 for file names passed to GTK+ functions under MSW.

When building wxGTK under MSW, always use UTF-8 as file name encoding because
GTK+ doesn't use G_FILENAME_ENCODING there.

Add a helper wxGTK_CONV_FN() macro to hide the difference between the
platforms.

Closes #14035.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-04-08 18:10:29 +00:00
parent 527f168b34
commit c282e47d8f
8 changed files with 29 additions and 12 deletions

View File

@@ -297,6 +297,7 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
// gtk+ 2.0 supports Unicode through UTF-8 strings
wxConvCurrent = &wxConvUTF8;
#ifdef __UNIX__
// decide which conversion to use for the file names
// (1) this variable exists for the sole purpose of specifying the encoding
@@ -345,6 +346,7 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
#endif // wxUSE_INTL
static wxConvBrokenFileNames fileconv(encName);
wxConvFileName = &fileconv;
#endif // __UNIX__
bool init_result;