summaryrefslogtreecommitdiff
path: root/lib/localcharset.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-07-08 23:15:22 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-07-08 23:15:22 +0200
commit853c9cf3718db7c9f6d723e45031016231e1cbd1 (patch)
treee6a5cafe819de3d14665da32bfd87259b089ec02 /lib/localcharset.c
parent7b350538dddb27a4513158cb6b6405b85f175ad1 (diff)
parent10bd216b0099d2ae8cb22c664fb725165096f95c (diff)
Merge branch 'release/debian/0.9.10-1'debian/0.9.10-1
Diffstat (limited to 'lib/localcharset.c')
-rw-r--r--lib/localcharset.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/localcharset.c b/lib/localcharset.c
index 8f07380..14b9cba 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006, 2008-2017 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2018 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or
modify it under the terms of either:
@@ -41,7 +41,7 @@
# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */
#endif
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
# define WINDOWS_NATIVE
# include <locale.h>
#endif
@@ -97,7 +97,7 @@
# define O_NOFOLLOW 0
#endif
-#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
/* Native Windows, Cygwin, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#endif
@@ -271,8 +271,10 @@ get_charset_aliases (void)
# if defined DARWIN7
/* To avoid the trouble of installing a file that is shared by many
GNU packages -- many packaging systems have problems with this --,
- simply inline the aliases here. */
- cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
+ simply inline the aliases here.
+ For speed, map the most frequent case first. */
+ cp = "UTF-8" "\0" "UTF-8" "\0"
+ "ISO8859-1" "\0" "ISO-8859-1" "\0"
"ISO8859-2" "\0" "ISO-8859-2" "\0"
"ISO8859-4" "\0" "ISO-8859-4" "\0"
"ISO8859-5" "\0" "ISO-8859-5" "\0"