Subject: bug#11926: 24.1; emacsclient doesn't respect system locale settings

From: Ivan Kalyaev <[email-masked]>
Date: Thu, 12 Jul 2012 22:29:18 +0400

When run as emacsclient, Emacs doesn't print non-ASCII characters.

Steps to reproduce
------------------

emacs -Q --daemon
emacsclient newfile

Type or paste some non-ASCII character (like `=D0=AA'). Instead of printing=
it out,
emacsclient will produce an action like M-0 or C-x.

If you type M-x set-locale-environment RET RET though, the characters
appear on the screen correctly.

In GNU Emacs 24.1.1 (x86_64-apple-darwin11.4.0)
of 2012-06-16 on gloriamundi.local
Configured using:
`configure '--prefix=3D/usr/local/Cellar/emacs/24.1' '--without-dbus'
'--enable-locallisppath=3D/usr/local/share/emacs/site-lisp'
'--infodir=3D/usr/local/Cellar/emacs/24.1/share/info/emacs' '--without-x'
'CC=3D/usr/bin/clang' 'CFLAGS=3D-Os -w -pipe -march=3Dnative
-Qunused-arguments''

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: UTF-8
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B=20
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC=20
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B=20
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC=20
O B ESC O B ESC O B ESC O B ESC O A ESC O A ESC O A=20
ESC O A ESC O A ESC O A ESC O A ESC O B ESC O B ESC=20
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B=20
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC=20
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B=20
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC=20
O B ESC O B ESC O B ESC O B C-c C-c y e s RET m a i=20
l SPC c l i TAB RET ESC O A ESC O A ESC O B ESC O B=20
ESC O B ESC O B ESC O A ESC O D C-x k RET n o RET C-x=20
C-c n ESC [ ? 1 ; 2 c C-x C-c y C-x C-c ESC [ ? 1 ;=20
2 c M-P M-0 ESC x ESC ESC ESC ESC x r e p o r t - e=20
m a c s - b u g RET

Recent messages:
byte-code: End of buffer [4 times]
byte-code: Beginning of buffer
call-interactively: Beginning of buffer
File no longer exists: /Users/ikalyaev/Sites/furskru/new, write buffer to f=
ile? (y or n)  y
Saving file /Users/ikalyaev/Sites/furskru/new...
Wrote /Users/ikalyaev/Sites/furskru/new
When done with a buffer, type C-x #
(No files need saving)
(New file)
When done with a buffer, type C-x #
Quit

Load-path shadows:
None found.

Features:
(mailalias mailclient browse-url cus-edit cus-start cus-load wid-edit
newcomment shadow sort gnus-util mail-extr emacsbug message format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils help-mode easymenu view vc-git
image server time-date ediff-hook vc-hooks lisp-float-type lisp-mode
register page menu-bar rfn-eshadow timer jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process multi-tty emacs)