--- sal/osl/w32/process.c
+++ sal/osl/w32/process.c
@@ -264,22 +264,21 @@
 	0
 };
 
-static rtl_uString ** osl_createCommandArgs_Impl (int argc, char ** argv)
+static rtl_uString ** osl_createCommandArgs_Impl (int argc)
 {
 	rtl_uString ** ppArgs =
 		(rtl_uString**)rtl_allocateZeroMemory (argc * sizeof(rtl_uString*));
 	if (ppArgs != 0)
 	{
-		rtl_TextEncoding encoding = osl_getThreadTextEncoding();
-
 		int i;
-		for (i = 0; i < argc; i++)
+		int nArgs;
+		LPWSTR *wargv = CommandLineToArgvW( GetCommandLineW(), &nArgs );
+		OSL_ASSERT( nArgs == argc );
+		for (i = 0; i < nArgs; i++)
 		{
-			/* Convert to unicode */
-			rtl_string2UString (
+			rtl_uString_newFromStr(
 				&(ppArgs[i]),
-				argv[i], rtl_str_getLength (argv[i]), encoding,
-				OSTRING_TO_OUSTRING_CVTFLAGS);
+				wargv[i]);
 		}
 		if (ppArgs[0] != 0)
 		{
@@ -368,10 +367,11 @@
 
 void SAL_CALL osl_setCommandArgs (int argc, char ** argv)
 {
+	(void) argv;
 	osl_acquireMutex (*osl_getGlobalMutex());
 	if (g_command_args.m_nCount == 0)
 	{
-		rtl_uString** ppArgs = osl_createCommandArgs_Impl (argc, argv);
+		rtl_uString** ppArgs = osl_createCommandArgs_Impl (argc);
 		if (ppArgs != 0)
 		{
 			g_command_args.m_nCount = argc;
