Imported Upstream version 2.14.2
[platform/upstream/fontconfig.git] / fc-list / fc-list.c
index 5cded50..54796c8 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <fontconfig/fontconfig.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #else
 #endif
 #define HAVE_GETOPT 1
 #endif
+#include <fontconfig/fontconfig.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <locale.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #ifdef ENABLE_NLS
 #include <libintl.h>
@@ -117,6 +121,7 @@ main (int argc, char **argv)
 #if HAVE_GETOPT_LONG || HAVE_GETOPT
     int                        c;
 
+    setlocale (LC_ALL, "");
 #if HAVE_GETOPT_LONG
     while ((c = getopt_long (argc, argv, "vbf:qVh", longopts, NULL)) != -1)
 #else