11615 should handle locale charmap aliases
Review Request #2293 - Created Sept. 11, 2019 and updated
Translate charmap aliases in libc.
$ locale LANG=C LC_CTYPE=C LC_NUMERIC=C LC_TIME=C LC_COLLATE=C LC_MONETARY=C LC_MESSAGES=C LC_ALL=C $ LD_LIBRARY_PATH=~/ws/il11615/proto/root_i386/lib LC_ALL=en_US.utf8 locale LANG=C LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_ALL=en_US.utf8 $ LD_LIBRARY_PATH=~/ws/il11615/proto/root_i386/lib LC_ALL=ru_RU.utf8 date 11 сентября 2019 г., 03:06:23 MSK
- add more aliases
I have also looked into improving this by e.g. exiting earlier if we already have proper name, and some other ideas, but it turns out there's no visible impact from this change as it is, tested using 10000's of
Revision 3 (+31 -1)
If the first half of the name doesn't fit, should we really try and continue using it in an alias construction?
So in all of these, if we can't actually fit the full new name and we would instead end up truncating the resulting name somehow, shouldn't we not use it? For example, if someone passes us a rather long locale name, feels like we shouldn't just end up trying to load some partial name instead.