]> git.sesse.net Git - vlc/commitdiff
Win32: use fputws instead of ToANSI+fputs
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 19 Mar 2013 23:10:06 +0000 (00:10 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 20 Mar 2013 10:41:25 +0000 (11:41 +0100)
src/text/unicode.c

index dd29bfaadefabfaa1f6b3c49a8f3ae0f1fbe74f7..65a158de21b5aaecdf4394f9705f532ab79c07b9 100644 (file)
@@ -81,12 +81,11 @@ int utf8_vfprintf( FILE *stream, const char *fmt, va_list ap )
         }
     }
 #endif
-
-    char *ansi = ToANSI (str);
-    if (ansi != NULL)
+    wchar_t *wide = ToWide(str);
+    if (likely(wide != NULL))
     {
-        fputs (ansi, stream);
-        free (ansi);
+        res = fputws(wide, stream);
+        free(wide);
     }
     else
         res = -1;