]> Savannah Git Hosting - gnulib.git/commit
localcharset: short-circuit the search for an alias on a Mac
authorBenno Schulenberg <bensberg@telfort.nl>
Sat, 21 Apr 2018 09:08:08 +0000 (11:08 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 21 Apr 2018 10:36:53 +0000 (12:36 +0200)
commit214bf852d8dab02bf62900e61facef2c9f48f2f4
treea9bcad2a1b1ba3d55ecb5f426777dc2ff3c85018
parentba54e151255c0d983c49205d73cd62029d1dbaaa
localcharset: short-circuit the search for an alias on a Mac

* lib/localcharset.c (get_charset_aliases): Add a tautological
UTF-8 entry to speed up the search for this case.

Most machines default to a UTF-8 locale nowadays, so begin the
list of aliases with a dummy UTF-8 entry so it will be found
immediately and a time-consuming search through the rest of
the list is avoided.
ChangeLog
lib/localcharset.c