Bug 104511
Summary: | Add “locale -c charmap” as an example to locale(1) | ||
---|---|---|---|
Product: | Documentation | Reporter: | Florian Weimer (fweimer) |
Component: | man-pages | Assignee: | documentation_man-pages (documentation_man-pages) |
Status: | RESOLVED CODE_FIX | ||
Severity: | enhancement | CC: | mtk.manpages, myllynen |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | No | Bisected commit-id: |
Description
Florian Weimer
2015-09-14 09:41:25 UTC
Hi Florian, The first example is: $ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" ... And there the encoding listed matches the charset in use, do you think an additional example would still be warranted? http://man7.org/linux/man-pages/man1/locale.1.html Thanks. (In reply to Marko Myllynen from comment #1) > Hi Florian, > > The first example is: > > $ locale > LANG=en_US.UTF-8 > LC_CTYPE="en_US.UTF-8" > ... > > And there the encoding listed matches the charset in use, do you think an > additional example would still be warranted? Yes, absolutely, because “locale -c charmap” works even if the charset is not part of the locale name: $ LC_ALL=zh_CN locale -c charmap LC_CTYPE GB2312 $ LC_ALL=lzh_TW locale -c charmap LC_CTYPE UTF-8 $ LC_ALL=zh_HK locale -c charmap LC_CTYPE BIG5-HKSCS I don't know of any other convenient way to obtain this information (short of writing a small C program which uses nl_langinfo(CODESET)). Patch posted at http://thread.gmane.org/gmane.linux.man/10064. Thanks. Closing this, as that patch was merged. |