This is Debian #392856, OpenSSH upstream #1346. Retain our chosen
`LANG' in another variable `LC_MDWSSHLANG', and reset the former from
the latter if it exists. The bizarre name helps with transmitting our
new variable through SSH connections and suchlike which might have
random limitations on environment variables.
###--------------------------------------------------------------------------
### Locale configuration.
###--------------------------------------------------------------------------
### Locale configuration.
-case ${DISPLAY+t} in
- t)
+case ${LC_MDWSSHLANG+t},${DISPLAY+t} in
+ t,*)
+ LANG=$LC_MDWSSHLANG
+ ;;
+ ,t)
__mdw_setconf LANG x-ctype POSIX
;;
*)
__mdw_setconf LANG x-ctype POSIX
;;
*)
LC_COLLATE=POSIX; export LC_COLLATE
LC_COLLATE=POSIX; export LC_COLLATE
+case ${LANG+t} in
+ t) LC_MDWSSHLANG=$LANG; export LC_MDWSSHLANG ;;
+esac
+
###--------------------------------------------------------------------------
### Pagers.
###--------------------------------------------------------------------------
### Pagers.