Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107386075
D17835.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17835.diff
View Options
Index: head/usr.bin/man/man.sh
===================================================================
--- head/usr.bin/man/man.sh
+++ head/usr.bin/man/man.sh
@@ -662,6 +662,7 @@
# Setup necessary locale variables.
man_setup_locale() {
local lang_cc
+ local locstr
locpaths='.'
man_charset='US-ASCII'
@@ -670,18 +671,25 @@
if [ -n "$oflag" ]; then
decho 'Using non-localized manpages'
else
- # Use the locale tool to give us the proper LC_CTYPE
+ # Use the locale tool to give us proper locale information
eval $( $LOCALE )
- case "$LC_CTYPE" in
+ if [ -n "$LANG" ]; then
+ locstr=$LANG
+ else
+ locstr=$LC_CTYPE
+ fi
+
+ case "$locstr" in
C) ;;
+ C.UTF-8) ;;
POSIX) ;;
[a-z][a-z]_[A-Z][A-Z]\.*)
- lang_cc="${LC_CTYPE%.*}"
- man_lang="${LC_CTYPE%_*}"
+ lang_cc="${locstr%.*}"
+ man_lang="${locstr%_*}"
man_country="${lang_cc#*_}"
- man_charset="${LC_CTYPE#*.}"
- locpaths="$LC_CTYPE"
+ man_charset="${locstr#*.}"
+ locpaths="$locstr"
locpaths="$locpaths:$man_lang.$man_charset"
if [ "$man_lang" != "en" ]; then
locpaths="$locpaths:en.$man_charset"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 14, 10:03 AM (13 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15793224
Default Alt Text
D17835.diff (1 KB)
Attached To
Mode
D17835: preemptively teach man(1) about C.UTF-8
Attached
Detach File
Event Timeline
Log In to Comment