src/win32.cpp
changeset 6602 391adb618a4c
parent 6601 2fce875cc53b
child 6624 554e5aee6c3f
--- a/src/win32.cpp	Sat Mar 10 00:27:20 2007 +0000
+++ b/src/win32.cpp	Sat Mar 10 00:29:20 2007 +0000
@@ -884,12 +884,16 @@
 	char *argv[64]; // max 64 command line arguments
 	char *cmdline;
 
+#if !defined(UNICODE)
+	_codepage = GetACP(); // get system codepage as some kind of a default
+#endif /* UNICODE */
+
 #if defined(UNICODE)
 	/* For UNICODE we need to convert the commandline to char* _AND_
 	 * save it because argv[] points into this buffer and thus needs to
 	 * be available between subsequent calls to FS2OTTD() */
 	char cmdlinebuf[MAX_PATH];
-#endif
+#endif /* UNICODE */
 
 	cmdline = WIDE_TO_MB_BUFFER(GetCommandLine(), cmdlinebuf, lengthof(cmdlinebuf));