Call dcpomatic_setup_path_encoding() early enough (#2665).
authorCarl Hetherington <cth@carlh.net>
Sat, 25 Nov 2023 20:07:50 +0000 (21:07 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 26 Nov 2023 23:53:17 +0000 (00:53 +0100)
On Windows this was previously called after we instantiated a Config
object to get win32_console(), meaning that the required path voodoo
was not active when looking for the config.  This caused problems
if the user has a non-ASCII user name.

src/tools/dcpomatic.cc

index 11181ae588067f89539af0d72df2d255759dc6fd..5bd8b8def425a677e50c45bce2d5a333e8dcc8ef 100644 (file)
@@ -1592,6 +1592,7 @@ public:
        App ()
                : wxApp ()
        {
+               dcpomatic_setup_path_encoding ();
 #ifdef DCPOMATIC_LINUX
                XInitThreads ();
 #endif
@@ -1644,8 +1645,6 @@ private:
                        make_foreground_application ();
 #endif
 
-                       dcpomatic_setup_path_encoding ();
-
                        /* Enable i18n; this will create a Config object
                           to look for a force-configured language.  This Config
                           object will be wrong, however, because dcpomatic_setup