commit | 0d6de44a37755f0e5046c04e19e4506a6d59e750 | [log] [download] |
---|---|---|
author | nicm <nicm> | Sat Mar 05 16:08:38 2016 +0000 |
committer | nicm <nicm> | Sat Mar 05 16:08:38 2016 +0000 |
tree | 769b5f5c99bf66eba5c29c3e0eb9d9c846a6f417 | |
parent | c38e0a4bbc722865f934db1282ca6f086874f530 [diff] |
If setlocale("en_US.UTF-8") succeeds, then don't do the check for UTF-8 locale since if it isn't UTF-8 the system is broken anyway. If it fails, try "" and check for UTF-8 with nl_langinfo(CODESET) rather than wcwidth(). Based on a diff from schwarze@, nl_langinfo also suggested by stsp@.