GNU bug report logs - #27505
LC_CTYPE affects tutorial language

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Leonard Lausen <leonard@HIDDEN>; dated Tue, 27 Jun 2017 14:50:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 11:22:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 07:22:25 2017
Received: from localhost ([127.0.0.1]:42555 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ddxA0-0008Ug-Qq
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 07:22:24 -0400
Received: from hercules.uberspace.de ([95.143.172.224]:33088 ident=VIalshelZOH)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leonard@HIDDEN>) id 1ddx9z-0008UX-3J
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 07:22:23 -0400
Received: (qmail 24539 invoked from network); 5 Aug 2017 11:22:21 -0000
Received: from localhost (HELO ?192.168.0.37?) (127.0.0.1)
 by hercules.uberspace.de with SMTP; 5 Aug 2017 11:22:21 -0000
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
From: Leonard Lausen <leonard@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN> <83k22iwl13.fsf@HIDDEN>
 <e7bd5196-b6b7-f798-5ca9-3aed36cc0d0d@HIDDEN> <837eyiweyh.fsf@HIDDEN>
 <7cdd7d3f-f704-1180-f95b-e243e4c2a658@HIDDEN> <83zibeuxpw.fsf@HIDDEN>
 <768be671-14b6-513c-f121-b2ffc9f9b4a7@HIDDEN>
 <87d18ai84f.fsf@HIDDEN>
 <61e641ab-83bf-5c93-8dda-15db547c6c4c@HIDDEN>
Message-ID: <aa8ffbc9-c7b9-71e4-98a3-a682ac87c7a3@HIDDEN>
Date: Sat, 5 Aug 2017 20:22:11 +0900
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.0
MIME-Version: 1.0
In-Reply-To: <61e641ab-83bf-5c93-8dda-15db547c6c4c@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27505
Cc: Eli Zaretskii <eliz@HIDDEN>, 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On 08/05/2017 08:20 PM, Leonard Lausen wrote:
>>> So I agree with the previous comment that LANG should take precedence
>>> over LC_CTYPE with regards to the interface language. Not sure if the
>>> current emacs implementation allows that change without affecting the
>>> settings where LC_CTYPE does change precedence over LANG.
>>
>> LANG never takes precedence over other LC_* values, it only serves as
>> the default for them.  An interface that uses LC_CTYPE must ignore LANG
>> when LC_CTYPE is set.
> 
> I agree that LC_CTYPE always takes precedence for the things that
> LC_CTYPE defines according to the POSIX standard. However, as far as I
> understand the display language is not defined by LC_CTYPE. LC_CTYPE
> defines "Character classification and case conversion".
> 
> The closest would be LC_MESSAGES ("Formats of informative and diagnostic
> messages and interactive responses."). I just tried, and for example vim
> uses indeed LC_MESSAGES to decide on the interface language. So does
> Chromium and KDE applications such as okular..

So what I mean to say is that LANG should take precedence over LC_CTYPE
with respect to the interface language. At least as long as LC_MESSAGES
is not defined. Of course you can argue if the interface language is the
same as "Formats of informative and diagnostic messages and interactive
responses.". But if you disagree with that, then LANG should always take
precedence.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 11:20:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 07:20:47 2017
Received: from localhost ([127.0.0.1]:42551 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ddx8R-0008Rk-EG
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 07:20:47 -0400
Received: from hercules.uberspace.de ([95.143.172.224]:60148 ident=UDM0qG0poWx)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leonard@HIDDEN>) id 1ddx8P-0008RY-8t
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 07:20:45 -0400
Received: (qmail 2484 invoked from network); 5 Aug 2017 11:20:35 -0000
Received: from localhost (HELO ?192.168.0.37?) (127.0.0.1)
 by hercules.uberspace.de with SMTP; 5 Aug 2017 11:20:35 -0000
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
To: Andreas Schwab <schwab@HIDDEN>
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN> <83k22iwl13.fsf@HIDDEN>
 <e7bd5196-b6b7-f798-5ca9-3aed36cc0d0d@HIDDEN> <837eyiweyh.fsf@HIDDEN>
 <7cdd7d3f-f704-1180-f95b-e243e4c2a658@HIDDEN> <83zibeuxpw.fsf@HIDDEN>
 <768be671-14b6-513c-f121-b2ffc9f9b4a7@HIDDEN>
 <87d18ai84f.fsf@HIDDEN>
From: Leonard Lausen <leonard@HIDDEN>
Message-ID: <61e641ab-83bf-5c93-8dda-15db547c6c4c@HIDDEN>
Date: Sat, 5 Aug 2017 20:20:27 +0900
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.0
MIME-Version: 1.0
In-Reply-To: <87d18ai84f.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27505
Cc: Eli Zaretskii <eliz@HIDDEN>, 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

>> So I agree with the previous comment that LANG should take precedence
>> over LC_CTYPE with regards to the interface language. Not sure if the
>> current emacs implementation allows that change without affecting the
>> settings where LC_CTYPE does change precedence over LANG.
> 
> LANG never takes precedence over other LC_* values, it only serves as
> the default for them.  An interface that uses LC_CTYPE must ignore LANG
> when LC_CTYPE is set.

I agree that LC_CTYPE always takes precedence for the things that
LC_CTYPE defines according to the POSIX standard. However, as far as I
understand the display language is not defined by LC_CTYPE. LC_CTYPE
defines "Character classification and case conversion".

The closest would be LC_MESSAGES ("Formats of informative and diagnostic
messages and interactive responses."). I just tried, and for example vim
uses indeed LC_MESSAGES to decide on the interface language. So does
Chromium and KDE applications such as okular..





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 11:09:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 07:09:25 2017
Received: from localhost ([127.0.0.1]:42546 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ddwxR-0008Af-Bv
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 07:09:25 -0400
Received: from mail-out.m-online.net ([212.18.0.9]:55393)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <whitebox@HIDDEN>) id 1ddwxP-0008AW-B5
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 07:09:23 -0400
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 3xPgzQ0R7Nz1qrNX;
 Sat,  5 Aug 2017 13:09:21 +0200 (CEST)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.70])
 by mail.m-online.net (Postfix) with ESMTP id 3xPgzP5PT9z3jR9b;
 Sat,  5 Aug 2017 13:09:21 +0200 (CEST)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,
 port 10024)
 with ESMTP id R-WUtDuWC369; Sat,  5 Aug 2017 13:09:21 +0200 (CEST)
X-Auth-Info: weSjohcG4H/zVg9nA3XKIReKGWyPFIDeAcYbXKFUZPQmbtTO7sVSCjM+69zKzUFg
Received: from igel.home (ppp-88-217-9-22.dynamic.mnet-online.de [88.217.9.22])
 (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPSA;
 Sat,  5 Aug 2017 13:09:21 +0200 (CEST)
Received: by igel.home (Postfix, from userid 1000)
 id 8FE0F2C3E95; Sat,  5 Aug 2017 13:09:20 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
To: Leonard Lausen <leonard@HIDDEN>
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN>
 <83k22iwl13.fsf@HIDDEN>
 <e7bd5196-b6b7-f798-5ca9-3aed36cc0d0d@HIDDEN>
 <837eyiweyh.fsf@HIDDEN>
 <7cdd7d3f-f704-1180-f95b-e243e4c2a658@HIDDEN>
 <83zibeuxpw.fsf@HIDDEN>
 <768be671-14b6-513c-f121-b2ffc9f9b4a7@HIDDEN>
X-Yow: -- I can do ANYTHING ... I can even ... SHOPLIFT!!
Date: Sat, 05 Aug 2017 13:09:20 +0200
In-Reply-To: <768be671-14b6-513c-f121-b2ffc9f9b4a7@HIDDEN> (Leonard
 Lausen's message of "Sat, 5 Aug 2017 19:50:25 +0900")
Message-ID: <87d18ai84f.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27505
Cc: Eli Zaretskii <eliz@HIDDEN>, 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Aug 05 2017, Leonard Lausen <leonard@HIDDEN> wrote:

> So I agree with the previous comment that LANG should take precedence
> over LC_CTYPE with regards to the interface language. Not sure if the
> current emacs implementation allows that change without affecting the
> settings where LC_CTYPE does change precedence over LANG.

LANG never takes precedence over other LC_* values, it only serves as
the default for them.  An interface that uses LC_CTYPE must ignore LANG
when LC_CTYPE is set.

Andreas.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 10:50:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 06:50:39 2017
Received: from localhost ([127.0.0.1]:42540 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ddwfF-0007jz-Uw
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 06:50:39 -0400
Received: from hercules.uberspace.de ([95.143.172.224]:45324 ident=jqwn4qSX0h0)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leonard@HIDDEN>) id 1ddwfD-0007jp-EY
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 06:50:36 -0400
Received: (qmail 7413 invoked from network); 5 Aug 2017 10:50:32 -0000
Received: from localhost (HELO ?192.168.0.14?) (127.0.0.1)
 by hercules.uberspace.de with SMTP; 5 Aug 2017 10:50:32 -0000
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
To: Eli Zaretskii <eliz@HIDDEN>
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN> <83k22iwl13.fsf@HIDDEN>
 <e7bd5196-b6b7-f798-5ca9-3aed36cc0d0d@HIDDEN> <837eyiweyh.fsf@HIDDEN>
 <7cdd7d3f-f704-1180-f95b-e243e4c2a658@HIDDEN> <83zibeuxpw.fsf@HIDDEN>
From: Leonard Lausen <leonard@HIDDEN>
Message-ID: <768be671-14b6-513c-f121-b2ffc9f9b4a7@HIDDEN>
Date: Sat, 5 Aug 2017 19:50:25 +0900
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.0
MIME-Version: 1.0
In-Reply-To: <83zibeuxpw.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

>>> See the "interpretation of sequences of bytes of text data as
>>> characters" parts: that's what causes Emacs to use LC_CTYPE to setup
>>> the language environment.  So we do follow Posix, AFAIU
>>
>> Hm, as long as LANG and LC_CTYPE both are UTF-8 locales, the
>> interpretation of bytes would be the same.
> 
> Yes, but LANG is the fallback in case LC_* are not defined, so I don't
> think how LANG set to a different language than LC_CTYPE could be
> according to Posix.

Well, it's a fallback for the things that the respectively undefined
LC_* variable would define. So the argument here is that LC_CTYPE
according to POSIX does not define the interface language.

The current behavior of emacs can only be justified by the "Additional
semantics of this variable, if any, are implementation-dependent."
clause for the LC_CTYPE variable. Note though that I have besides
Dropbox not found a single program which uses LC_CTYPE to set the
interface language. Instead those other programs rely on LANG. You may
try "LANG=zh_CN.utf8 vim" compared to  "LC_CTYPE=zh_CN.utf8 vim" as
example. Also the name of LANG compared to LC_CTYPE does somewhat
suggest to me that it should define the interface language whereas CTYPE
should define the "character types" (?) ;)

So I agree with the previous comment that LANG should take precedence
over LC_CTYPE with regards to the interface language. Not sure if the
current emacs implementation allows that change without affecting the
settings where LC_CTYPE does change precedence over LANG.

But nevermind if you prefer to keep the current behavior. You taught me
how to overwrite the language variable manually, so while I still am
unhappy about emacs behaving differently to most applications, my
immediate concern is resolved ;)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 10:16:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 06:16:01 2017
Received: from localhost ([127.0.0.1]:42534 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ddw7k-0006sc-VU
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 06:16:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48432)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ddw7j-0006sO-3T
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 06:15:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1ddw7Z-0003RM-EY
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 06:15:54 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45937)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1ddw7Z-0003RD-6A; Sat, 05 Aug 2017 06:15:49 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1599
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ddw7Y-0000gM-HJ; Sat, 05 Aug 2017 06:15:48 -0400
Date: Sat, 05 Aug 2017 13:15:39 +0300
Message-Id: <83zibeuxpw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Leonard Lausen <leonard@HIDDEN>
In-reply-to: <7cdd7d3f-f704-1180-f95b-e243e4c2a658@HIDDEN> (message from
 Leonard Lausen on Sat, 5 Aug 2017 18:52:38 +0900)
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN> <83k22iwl13.fsf@HIDDEN>
 <e7bd5196-b6b7-f798-5ca9-3aed36cc0d0d@HIDDEN> <837eyiweyh.fsf@HIDDEN>
 <7cdd7d3f-f704-1180-f95b-e243e4c2a658@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> Cc: 27505 <at> debbugs.gnu.org
> From: Leonard Lausen <leonard@HIDDEN>
> Date: Sat, 5 Aug 2017 18:52:38 +0900
> 
> > But I don't see why that would be a problem for you: if you don't want
> > that Emacs language environment be Chinese when you use XIM, you
> > should be able to invoke set-language-environment inside Emacs after
> > starting it, to set the language environment to something other than
> > Chinese.  Does that work for you?
> 
> That is a good workaround. I created this bug report, as I would expect
> this as default behavior though.

The default behavior is very unlikely to change, sorry.  It took us
many years to arrive at the current behavior, so changing that for a
single use case, even if it's deemed important, makes little sense to
me.

> > See the "interpretation of sequences of bytes of text data as
> > characters" parts: that's what causes Emacs to use LC_CTYPE to setup
> > the language environment.  So we do follow Posix, AFAIU
> 
> Hm, as long as LANG and LC_CTYPE both are UTF-8 locales, the
> interpretation of bytes would be the same.

Yes, but LANG is the fallback in case LC_* are not defined, so I don't
think how LANG set to a different language than LC_CTYPE could be
according to Posix.

> In principle the interface
> language is independent from the interpretation of bytes right? One
> could just parse the first part of LANG (i.e. "en_EN") do decide the
> display language but follow LC_CTYPE for the interpretation of bytes.
> This seems also to be what the majority of applications are doing, given
> that I set LC_CTYPE to Chinese system wide, but only emacs (and Dropbox)
> are changing their interface language (more specifically the tutorial
> language).

In Emacs, "display language" is just one aspect of the multi-lingual
environment.  So I'm afraid if the default is not to your liking, you
will have to customize the individual aspects of the language
environment separately, as you see fit.  That's why those variables
exist in the first place -- to tailor the Emacs operation to even rare
and non-typical use cases.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 09:52:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 05:52:54 2017
Received: from localhost ([127.0.0.1]:42504 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ddvlO-0006JV-NO
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 05:52:54 -0400
Received: from hercules.uberspace.de ([95.143.172.224]:42942 ident=voC6uic19Fv)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leonard@HIDDEN>) id 1ddvlM-0006JJ-AG
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 05:52:52 -0400
Received: (qmail 13892 invoked from network); 5 Aug 2017 09:52:46 -0000
Received: from localhost (HELO ?192.168.0.14?) (127.0.0.1)
 by hercules.uberspace.de with SMTP; 5 Aug 2017 09:52:46 -0000
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
To: Eli Zaretskii <eliz@HIDDEN>
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN> <83k22iwl13.fsf@HIDDEN>
 <e7bd5196-b6b7-f798-5ca9-3aed36cc0d0d@HIDDEN> <837eyiweyh.fsf@HIDDEN>
From: Leonard Lausen <leonard@HIDDEN>
Message-ID: <7cdd7d3f-f704-1180-f95b-e243e4c2a658@HIDDEN>
Date: Sat, 5 Aug 2017 18:52:38 +0900
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.0
MIME-Version: 1.0
In-Reply-To: <837eyiweyh.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

> I don't see any experts we have who could fix that, unfortunately.

> But I don't see why that would be a problem for you: if you don't want
> that Emacs language environment be Chinese when you use XIM, you
> should be able to invoke set-language-environment inside Emacs after
> starting it, to set the language environment to something other than
> Chinese.  Does that work for you?

That is a good workaround. I created this bug report, as I would expect
this as default behavior though.

Unfortunately XIM currently does not work for me at all. So I can't
confirm that changing set-language-environment won't stop XIM from
working. (Though XIM  worked for me before making a switch from
Debian-based to Gentoo.. Bug
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27312 ).

>> As far as I understand the current behavior of emacs to change the
>> interface language based on LC_CTYPE is application defined behavior
>> that is not part of Posix. Posix only says:
>>
>>> This variable determines the locale category for character handling
>>> functions, such as tolower(), toupper() and isalpha(). This
>>> environment variable determines the interpretation of sequences of
>>> bytes of text data as characters (for example, single- as opposed to
>>> multi-byte characters), the classification of characters (for
>>> example, alpha, digit, graph) and the behaviour of character classes.
>>> Additional semantics of this variable, if any, are
>>> implementation-dependent.
> 
> See the "interpretation of sequences of bytes of text data as
> characters" parts: that's what causes Emacs to use LC_CTYPE to setup
> the language environment.  So we do follow Posix, AFAIU

Hm, as long as LANG and LC_CTYPE both are UTF-8 locales, the
interpretation of bytes would be the same. In principle the interface
language is independent from the interpretation of bytes right? One
could just parse the first part of LANG (i.e. "en_EN") do decide the
display language but follow LC_CTYPE for the interpretation of bytes.
This seems also to be what the majority of applications are doing, given
that I set LC_CTYPE to Chinese system wide, but only emacs (and Dropbox)
are changing their interface language (more specifically the tutorial
language).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 09:18:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 05:18:19 2017
Received: from localhost ([127.0.0.1]:42480 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ddvDu-0005UM-PN
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 05:18:18 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51582)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ddvDs-0005U7-HE
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 05:18:16 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1ddvDk-0007Hp-4w
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 05:18:11 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43707)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1ddvDk-0007HP-2O; Sat, 05 Aug 2017 05:18:08 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1410
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ddvDi-0002Ez-5N; Sat, 05 Aug 2017 05:18:06 -0400
Date: Sat, 05 Aug 2017 12:17:58 +0300
Message-Id: <837eyiweyh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Leonard Lausen <leonard@HIDDEN>
In-reply-to: <e7bd5196-b6b7-f798-5ca9-3aed36cc0d0d@HIDDEN> (message from
 Leonard Lausen on Sat, 5 Aug 2017 17:17:47 +0900)
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN> <83k22iwl13.fsf@HIDDEN>
 <e7bd5196-b6b7-f798-5ca9-3aed36cc0d0d@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> Cc: 27505 <at> debbugs.gnu.org
> From: Leonard Lausen <leonard@HIDDEN>
> Date: Sat, 5 Aug 2017 17:17:47 +0900
> 
> I would be more than happy to not set LC_CTYPE to Chinese, if #10867
> gets fixed. Until then it seems the only way to get XIM working. If I
> remember correctly though, #10867 is intended behavior and won't be
> fixed (which is not sensible IMO).
> 
> My problem is, that just because I would like to use XIM doesn't mean
> that I would like to see any of the emacs interface in the LC_CTYPE
> language. So given that #10867 seems to be intended behavior at least
> emacs shouldn't rely on LC_CTYPE to change the
> interface language in any user-visible way. From my perspective it would
> make more sense to fix #10867 though.

I don't see any experts we have who could fix that, unfortunately.

But I don't see why that would be a problem for you: if you don't want
that Emacs language environment be Chinese when you use XIM, you
should be able to invoke set-language-environment inside Emacs after
starting it, to set the language environment to something other than
Chinese.  Does that work for you?

> As far as I understand the current behavior of emacs to change the
> interface language based on LC_CTYPE is application defined behavior
> that is not part of Posix. Posix only says:
> 
> > This variable determines the locale category for character handling
> > functions, such as tolower(), toupper() and isalpha(). This
> > environment variable determines the interpretation of sequences of
> > bytes of text data as characters (for example, single- as opposed to
> > multi-byte characters), the classification of characters (for
> > example, alpha, digit, graph) and the behaviour of character classes.
> > Additional semantics of this variable, if any, are
> > implementation-dependent.

See the "interpretation of sequences of bytes of text data as
characters" parts: that's what causes Emacs to use LC_CTYPE to setup
the language environment.  So we do follow Posix, AFAIU.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 08:18:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 04:18:35 2017
Received: from localhost ([127.0.0.1]:42438 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dduI7-00041R-2N
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 04:18:35 -0400
Received: from hercules.uberspace.de ([95.143.172.224]:48044 ident=8qmFMcgevpD)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leonard@HIDDEN>) id 1dduI4-00041G-Qo
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 04:18:33 -0400
Received: (qmail 12834 invoked from network); 5 Aug 2017 08:18:30 -0000
Received: from localhost (HELO ?192.168.0.14?) (127.0.0.1)
 by hercules.uberspace.de with SMTP; 5 Aug 2017 08:18:30 -0000
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
To: Eli Zaretskii <eliz@HIDDEN>
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN> <83k22iwl13.fsf@HIDDEN>
From: Leonard Lausen <leonard@HIDDEN>
Message-ID: <7d9c1e09-eec9-763f-8180-1d592d806702@HIDDEN>
Date: Sat, 5 Aug 2017 17:18:23 +0900
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.0
MIME-Version: 1.0
In-Reply-To: <83k22iwl13.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Hey Eli,

thanks for your reply.

> Yes, there should be such a way, and in fact it is already, and
> always was, implemented in Emacs.  The values of LC_CTYPE etc.
> environment variables are only used to set up the _defaults_; users
> can use commands and options to override those defaults in many ways.
> For example, "C-h t" can be invoked with a numeric argument ("C-u C-h
> t") in which case Emacs will ask you in what language to display the 
> tutorial.  As another example, input method of your choosing can be 
> invoked at any moment with "C-u C-\"; then you can switch it back
> off as soon as you've finished typing characters that are not
> directly accessible from your system keyboard.  Finally, the
> language environment of your choosing can be set with "C-x RET l",
> and doing that will set many other defaults according to the
> language environment you select.

I was not aware of the feature to change the tutorial language via "C-u
C-h t". Thanks for pointing that out.

> Given all these facilities, I'm not sure I understand what exactly
> is your problem.  The original report was about the tutorial
> language, but you never explained why did you set LC_CTYPE to the
> value that specified Chinese.  If you did that for some reason other
> than for using Chinese in your programs, then perhaps you shouldn't
> set LC_CTYPE, and instead should use the above-mentioned, more
> focused, Emacs features to specify Chinese where you want it?

Sorry for not being clear about it. To input Chinese, Japanese or Korean
(CJK) on Linux people usually rely on tools such as fcitx or ibus, which
allow
inputting CJK characters in any application. They are also supported by
emacs via the X Input Method (XIM) protocol.

Unfortunately XIM is only supported in emacs when LC_CTYPE is set to a
CJK locale (#10867: must export LC_CTYPE to zh_CN.UTF-8 or similar CJK
locale to use X input method).

Compared to using emacs input methods, fcitx provides the same
experience for all desktop applications and arguably better statistical
matching methods to match the user input (Latin characters) to the
target CJK Characters, so it is preferable over the emacs input methods
 ("C-u C-\").

I would be more than happy to not set LC_CTYPE to Chinese, if #10867
gets fixed. Until then it seems the only way to get XIM working. If I
remember correctly though, #10867 is intended behavior and won't be
fixed (which is not sensible IMO).

My problem is, that just because I would like to use XIM doesn't mean
that I would like to see any of the emacs interface in the LC_CTYPE
language. So given that #10867 seems to be intended behavior at least
emacs shouldn't rely on LC_CTYPE to change the
interface language in any user-visible way. From my perspective it would
make more sense to fix #10867 though.

> That'd go against the Posix semantics of these variables, so we 
> shouldn't do that, because it might not be what is expected by users 
> who set both LANG and other LC_* variables.
> 
> As I wrote previously, I don't really understand the exact problem
> we are asked to solve here.  I don't think we should be discussing 
> solutions before we understand the actual problem.  Right now, I 
> believe that Emacs already provides features to resolve any such 
> problems.

As far as I understand the current behavior of emacs to change the
interface language based on LC_CTYPE is application defined behavior
that is not part of Posix. At least according to
http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html :

> This variable determines the locale category for character handling
> functions, such as tolower(), toupper() and isalpha(). This
> environment variable determines the interpretation of sequences of
> bytes of text data as characters (for example, single- as opposed to
> multi-byte characters), the classification of characters (for
> example, alpha, digit, graph) and the behaviour of character classes.
> Additional semantics of this variable, if any, are
> implementation-dependent.

So I see no problem with LANG defining the interface language and
LC_CTYPE taking care of the character handling..

Best regards
Leonard

PS: Besides emacs bug 10867 there is also an Ubuntu bug from 2009
https://bugs.launchpad.net/ubuntu/+source/emacs-snapshot/+bug/434730
Or in Chinese forums https://emacs-china.org/t/emacs-gui/1271




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 08:18:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 04:18:00 2017
Received: from localhost ([127.0.0.1]:42434 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dduHX-00040G-MW
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 04:17:59 -0400
Received: from hercules.uberspace.de ([95.143.172.224]:47706 ident=1BwCGrxK54f)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leonard@HIDDEN>) id 1dduHV-000405-G2
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 04:17:58 -0400
Received: (qmail 11423 invoked from network); 5 Aug 2017 08:17:54 -0000
Received: from localhost (HELO ?192.168.0.14?) (127.0.0.1)
 by hercules.uberspace.de with SMTP; 5 Aug 2017 08:17:54 -0000
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
To: Eli Zaretskii <eliz@HIDDEN>
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN> <83k22iwl13.fsf@HIDDEN>
From: Leonard Lausen <leonard@HIDDEN>
Message-ID: <e7bd5196-b6b7-f798-5ca9-3aed36cc0d0d@HIDDEN>
Date: Sat, 5 Aug 2017 17:17:47 +0900
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.0
MIME-Version: 1.0
In-Reply-To: <83k22iwl13.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Hey Eli,

thanks for your reply.

> Yes, there should be such a way, and in fact it is already, and
> always was, implemented in Emacs.  The values of LC_CTYPE etc.
> environment variables are only used to set up the _defaults_; users
> can use commands and options to override those defaults in many ways.
> For example, "C-h t" can be invoked with a numeric argument ("C-u C-h
> t") in which case Emacs will ask you in what language to display the 
> tutorial.  As another example, input method of your choosing can be 
> invoked at any moment with "C-u C-\"; then you can switch it back
> off as soon as you've finished typing characters that are not
> directly accessible from your system keyboard.  Finally, the
> language environment of your choosing can be set with "C-x RET l",
> and doing that will set many other defaults according to the
> language environment you select.

I was not aware of the feature to change the tutorial language via "C-u
C-h t". Thanks for pointing that out.

> Given all these facilities, I'm not sure I understand what exactly
> is your problem.  The original report was about the tutorial
> language, but you never explained why did you set LC_CTYPE to the
> value that specified Chinese.  If you did that for some reason other
> than for using Chinese in your programs, then perhaps you shouldn't
> set LC_CTYPE, and instead should use the above-mentioned, more
> focused, Emacs features to specify Chinese where you want it?

Sorry for not being clear about it. To input Chinese, Japanese or Korean
(CJK) on Linux people usually rely on tools such as fcitx or ibus, which
allow
inputting CJK characters in any application. They are also supported by
emacs via the X Input Method (XIM) protocol.

Unfortunately XIM is only supported in emacs when LC_CTYPE is set to a
CJK locale (#10867: must export LC_CTYPE to zh_CN.UTF-8 or similar CJK
locale to use X input method).

Compared to using emacs input methods, fcitx provides the same
experience for all desktop applications and arguably better statistical
matching methods to match the user input (Latin characters) to the
target CJK Characters, so it is preferable over the emacs input methods
 ("C-u C-\").

I would be more than happy to not set LC_CTYPE to Chinese, if #10867
gets fixed. Until then it seems the only way to get XIM working. If I
remember correctly though, #10867 is intended behavior and won't be
fixed (which is not sensible IMO).

My problem is, that just because I would like to use XIM doesn't mean
that I would like to see any of the emacs interface in the LC_CTYPE
language. So given that #10867 seems to be intended behavior at least
emacs shouldn't rely on LC_CTYPE to change the
interface language in any user-visible way. From my perspective it would
make more sense to fix #10867 though.

> That'd go against the Posix semantics of these variables, so we 
> shouldn't do that, because it might not be what is expected by users 
> who set both LANG and other LC_* variables.
> 
> As I wrote previously, I don't really understand the exact problem
> we are asked to solve here.  I don't think we should be discussing 
> solutions before we understand the actual problem.  Right now, I 
> believe that Emacs already provides features to resolve any such 
> problems.

As far as I understand the current behavior of emacs to change the
interface language based on LC_CTYPE is application defined behavior
that is not part of Posix. Posix only says:

> This variable determines the locale category for character handling
> functions, such as tolower(), toupper() and isalpha(). This
> environment variable determines the interpretation of sequences of
> bytes of text data as characters (for example, single- as opposed to
> multi-byte characters), the classification of characters (for
> example, alpha, digit, graph) and the behaviour of character classes.
> Additional semantics of this variable, if any, are
> implementation-dependent.

So I see no problem with LANG defining the interface language and
LC_CTYPE taking care of the character handling..

Best regards
Leonard

PS: Besides emacs bug 10867 there is also an Ubuntu bug from 2009
https://bugs.launchpad.net/ubuntu/+source/emacs-snapshot/+bug/434730
Or in Chinese forums https://emacs-china.org/t/emacs-gui/1271




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 07:11:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 03:11:05 2017
Received: from localhost ([127.0.0.1]:42392 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ddtEn-0002Pl-4L
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 03:11:05 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49112)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ddtEl-0002PH-Tu
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 03:11:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1ddtEd-0007Yg-Oh
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 03:10:58 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34653)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1ddtEd-0007Yc-Lh; Sat, 05 Aug 2017 03:10:55 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1131
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ddtEc-0002sT-EX; Sat, 05 Aug 2017 03:10:55 -0400
Date: Sat, 05 Aug 2017 10:10:46 +0300
Message-Id: <83ini2wkuh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: npostavs@HIDDEN
In-reply-to: <87shh66a55.fsf@HIDDEN>
 (npostavs@HIDDEN)
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN>
 <87shh66a55.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org, leonard@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: npostavs@HIDDEN
> Date: Fri, 04 Aug 2017 22:06:30 -0400
> Cc: 27505 <at> debbugs.gnu.org
> 
> Or should LANG should take precedence over LC_CTYPE perhaps?

That'd go against the Posix semantics of these variables, so we
shouldn't do that, because it might not be what is expected by users
who set both LANG and other LC_* variables.

As I wrote previously, I don't really understand the exact problem we
are asked to solve here.  I don't think we should be discussing
solutions before we understand the actual problem.  Right now, I
believe that Emacs already provides features to resolve any such
problems.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 07:07:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 03:07:06 2017
Received: from localhost ([127.0.0.1]:42388 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ddtAw-0002KN-Hp
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 03:07:06 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46227)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ddtAv-0002Js-5w
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 03:07:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1ddtAn-0004MY-0w
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 03:07:00 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34288)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1ddtAm-0004MI-T5; Sat, 05 Aug 2017 03:06:56 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1090
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ddtAm-0005jb-2e; Sat, 05 Aug 2017 03:06:56 -0400
Date: Sat, 05 Aug 2017 10:06:48 +0300
Message-Id: <83k22iwl13.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Leonard Lausen <leonard@HIDDEN>
In-reply-to: <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN> (message from
 Leonard Lausen on Sat, 5 Aug 2017 10:54:37 +0900)
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Leonard Lausen <leonard@HIDDEN>
> Date: Sat, 5 Aug 2017 10:54:37 +0900
> 
> Please reopen this bug.

Continuing the discussions doesn't require reopening the bug, as long
as we don't intend to make any changes for it.

> In that case though I believe the intended emacs behavior does not make
> sense. Given that I need to set LC_CTYPE=zh_CN.UTF-8 just to make it
> possible to use input system input methods for Chinese characters
> doesn't mean I want to actually use a Chinese language interface.
> 
> Or concretely, I am learning Chinese and am comfortable typing it or
> having daily conversations, however I don't feel comfortable reading the
> emacs manual in Chinese. For my language learning I also tend to keep
> some notes in Chinese which I would like to edit with emacs.
> 
> Shouldn't there be a way to allow people to input Chinese (or other
> non-European languages) without affecting the language environment? The
> current behavior seems to discriminate language learners

Yes, there should be such a way, and in fact it is already, and always
was, implemented in Emacs.  The values of LC_CTYPE etc. environment
variables are only used to set up the _defaults_; users can use
commands and options to override those defaults in many ways.  For
example, "C-h t" can be invoked with a numeric argument ("C-u C-h t")
in which case Emacs will ask you in what language to display the
tutorial.  As another example, input method of your choosing can be
invoked at any moment with "C-u C-\"; then you can switch it back off
as soon as you've finished typing characters that are not directly
accessible from your system keyboard.  Finally, the language
environment of your choosing can be set with "C-x RET l", and doing
that will set many other defaults according to the language
environment you select.

Given all these facilities, I'm not sure I understand what exactly is
your problem.  The original report was about the tutorial language,
but you never explained why did you set LC_CTYPE to the value that
specified Chinese.  If you did that for some reason other than for
using Chinese in your programs, then perhaps you shouldn't set
LC_CTYPE, and instead should use the above-mentioned, more focused,
Emacs features to specify Chinese where you want it?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 05:59:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 01:59:55 2017
Received: from localhost ([127.0.0.1]:42355 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dds7v-0000hN-Hw
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2017 01:59:55 -0400
Received: from hercules.uberspace.de ([95.143.172.224]:53872 ident=52eEbfyPW0i)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leonard@HIDDEN>) id 1dds7t-0000hD-Ho
 for 27505 <at> debbugs.gnu.org; Sat, 05 Aug 2017 01:59:54 -0400
Received: (qmail 26055 invoked from network); 5 Aug 2017 05:59:48 -0000
Received: from localhost (HELO ?192.168.0.37?) (127.0.0.1)
 by hercules.uberspace.de with SMTP; 5 Aug 2017 05:59:48 -0000
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
To: npostavs@HIDDEN
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN>
 <87shh66a55.fsf@HIDDEN>
From: Leonard Lausen <leonard@HIDDEN>
Message-ID: <a68cc2fe-9a3e-578c-ec17-924a8398a7d7@HIDDEN>
Date: Sat, 5 Aug 2017 14:59:39 +0900
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.0
MIME-Version: 1.0
In-Reply-To: <87shh66a55.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

> Does setting LC_ALL=en_US.UTF-8 and LC_CTYPE=zh_CN.UTF-8 work?

Due to bug 27312 unfortunately I can't test if setting
LC_ALL=en_US.UTF-8 and LC_CTYPE=zh_CN.UTF-8 works (i.e. still allows
using the X input method). But I would expect it not to work, as LC_ALL
is supposed to overwrite  LC_CTYPE (see also below).

Arguably #10867 should be fixed directly and the X input method should
work independently of the setting of LC_CTYPE.

> Or should LANG should take precedence over LC_CTYPE perhaps?

Using LANG to decide the language of the tutorial should also work. But
would changing the precedence order to set current-language-environment
based on LANG not interfere with bug #10867? I.e. does emacs directly
check LC_CTYPE to decide if it supports using the X input method or does
it check current-language-environment (#10867).

In the latter case simply changing the precedence order wouldn't fix the
problem, as it would still require me to have
current-language-environment to be set to Chinese just to input Chinese
characters..




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.
Removed tag(s) notabug. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 02:04:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 04 22:04:58 2017
Received: from localhost ([127.0.0.1]:42231 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ddoSY-0001nV-2h
	for submit <at> debbugs.gnu.org; Fri, 04 Aug 2017 22:04:58 -0400
Received: from mail-it0-f66.google.com ([209.85.214.66]:38463)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1ddoSW-0001nB-2B; Fri, 04 Aug 2017 22:04:56 -0400
Received: by mail-it0-f66.google.com with SMTP id h199so2162944ith.5;
 Fri, 04 Aug 2017 19:04:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=J7yUdCFv19O41Q+dDq2223zZeyN9kaSdnRyX+NwbEWc=;
 b=h30uWdbQYufrH+FThwQpPROpAQcpqaTspVYu+1QjL5PaeSU0qlqxqD4Xv3bSFGlcFs
 QhOOG/LJdHk+im6VlRbS5uRDoC6q9agxTibystwcfjaaQGI60PFOyO5qL/MUafE6tMtC
 RrbCRaee14LI4zLIr6dBosZ91zXcCgEJ/7g6tWkXYjlBO9tKMgBbpPhSJIkPYMj81wvI
 Yn2n8SCI4jd3bKAxvF3HqoTU4P0NGx3nfcTf1BdTleY0+ADw2iO/X5u5vhC+IDFOSrkk
 97N6vHsfgjCTz4e7OL5heyO//zNXvu5GHnbywPnHzIBjSKah9Zod/U+zFzoZKdwWd0F2
 XdtQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version
 :content-transfer-encoding;
 bh=J7yUdCFv19O41Q+dDq2223zZeyN9kaSdnRyX+NwbEWc=;
 b=rukdGzaiwFqEDgATE8f5NG3kPjWjA22QB+DThSXJDxh7jjTsmhszmmmY7nWD+CBn2g
 jl0egzD550RohdjBzJtmDWoIJSBCldJ8FfWEGpN45ZFPbGVe5O8whsuzcZP/aiY6RGuj
 +NgxfouXxwMPvpO+DwVYGZn/tuJDb/2axLwwrnZWfUqJw+O4/g3XVMhgg/YkNv/JwbrA
 cxFj+fC0fjlpHMsAYzpjGX0pPcm77W1Vld7RSX96hJudTq5pOeM7+arIYZKtDoe11OQW
 Wml++rH9CjLmJdaxWYKZSrcoMoEuC9pIPurCJMME0oqvji7kda4XBW3AW6RuNFuA5dfz
 BZ8A==
X-Gm-Message-State: AIVw112G/oqEC5GuVPp0Bdr3gL5hsTx2miYBxjqkIGpvYp9RIau9TEUs
 ofmKlotUpCL8qVsU
X-Received: by 10.36.69.73 with SMTP id y70mr4820741ita.94.1501898690326;
 Fri, 04 Aug 2017 19:04:50 -0700 (PDT)
Received: from zony ([45.2.119.48])
 by smtp.googlemail.com with ESMTPSA id g13sm1428865ioi.0.2017.08.04.19.04.48
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Fri, 04 Aug 2017 19:04:49 -0700 (PDT)
From: npostavs@HIDDEN
To: Leonard Lausen <leonard@HIDDEN>
Subject: Re: bug#27505: acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
 <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN>
Date: Fri, 04 Aug 2017 22:06:30 -0400
In-Reply-To: <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN> (Leonard
 Lausen's message of "Sat, 5 Aug 2017 10:54:37 +0900")
Message-ID: <87shh66a55.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)

reopen 27505
tags 27505 - notabug
quit

Leonard Lausen <leonard@HIDDEN> writes:

> Please reopen this bug. Unfortunately my previous reply was only sent to
> Andreas, but not to the bug list. I am attaching it below. A short
> summary is that emacs is assuming the language I occasionally need to
> input is also the language I want to read by default, which is a wrong
> assumption. Note that its not possible to input Chinese characters in
> emacs without setting LC_CTYPE to zh_CN.

Does setting LC_ALL=3Den_US.UTF-8 and LC_CTYPE=3Dzh_CN.UTF-8 work?

     Some operating systems let you specify the character-set locale you
  are using by setting the locale environment variables =E2=80=98LC_ALL=E2=
=80=99,
  =E2=80=98LC_CTYPE=E2=80=99, or =E2=80=98LANG=E2=80=99.  (If more than one=
 of these is set, the first one
  that is nonempty specifies your locale for this purpose.)

Or should LANG should take precedence over LC_CTYPE perhaps?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 5 Aug 2017 01:54:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 04 21:54:51 2017
Received: from localhost ([127.0.0.1]:42224 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ddoIk-0001YV-Rf
	for submit <at> debbugs.gnu.org; Fri, 04 Aug 2017 21:54:51 -0400
Received: from hercules.uberspace.de ([95.143.172.224]:59348 ident=ySPFh5YPYXQ)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leonard@HIDDEN>) id 1ddoIi-0001YL-8c
 for 27505 <at> debbugs.gnu.org; Fri, 04 Aug 2017 21:54:48 -0400
Received: (qmail 30420 invoked from network); 5 Aug 2017 01:54:45 -0000
Received: from localhost (HELO ?10.64.184.121?) (127.0.0.1)
 by hercules.uberspace.de with SMTP; 5 Aug 2017 01:54:45 -0000
Subject: Re: bug#27505 acknowledged by developer (Re: bug#27505: LC_CTYPE
 affects tutorial language)
To: 27505 <at> debbugs.gnu.org
References: <871soq7pyr.fsf@HIDDEN>
 <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
 <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
From: Leonard Lausen <leonard@HIDDEN>
Message-ID: <d6543bc3-a8f2-f825-7a5b-4d1f4f0a66fb@HIDDEN>
Date: Sat, 5 Aug 2017 10:54:37 +0900
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.0
MIME-Version: 1.0
In-Reply-To: <handler.27505.C.150189707129878.notifdonectrl.0 <at> debbugs.gnu.org>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27505
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Please reopen this bug. Unfortunately my previous reply was only sent to
Andreas, but not to the bug list. I am attaching it below. A short
summary is that emacs is assuming the language I occasionally need to
input is also the language I want to read by default, which is a wrong
assumption. Note that its not possible to input Chinese characters in
emacs without setting LC_CTYPE to zh_CN.


Thanks Andreas and Eli for the prompt reply.

In that case though I believe the intended emacs behavior does not make
sense. Given that I need to set LC_CTYPE=zh_CN.UTF-8 just to make it
possible to use input system input methods for Chinese characters
doesn't mean I want to actually use a Chinese language interface.

Or concretely, I am learning Chinese and am comfortable typing it or
having daily conversations, however I don't feel comfortable reading the
emacs manual in Chinese. For my language learning I also tend to keep
some notes in Chinese which I would like to edit with emacs.

Shouldn't there be a way to allow people to input Chinese (or other
non-European languages) without affecting the language environment? The
current behavior seems to discriminate language learners

What do you think?

Thanks!

Best regards
Leonard




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.
bug closed, send any further explanations to 27505 <at> debbugs.gnu.org and Leonard Lausen <leonard@HIDDEN> Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.
Added tag(s) notabug. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 27 Jun 2017 15:13:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 27 11:13:16 2017
Received: from localhost ([127.0.0.1]:40996 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dPsB2-0000q7-LU
	for submit <at> debbugs.gnu.org; Tue, 27 Jun 2017 11:13:16 -0400
Received: from mx2.suse.de ([195.135.220.15]:53876 helo=mx1.suse.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <schwab@HIDDEN>) id 1dPsB1-0000pz-7F
 for 27505 <at> debbugs.gnu.org; Tue, 27 Jun 2017 11:13:15 -0400
X-Virus-Scanned: by amavisd-new at test-mx.suse.de
Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254])
 by mx1.suse.de (Postfix) with ESMTP id 25762AC41;
 Tue, 27 Jun 2017 15:13:14 +0000 (UTC)
From: Andreas Schwab <schwab@HIDDEN>
To: Leonard Lausen <leonard@HIDDEN>
Subject: Re: bug#27505: LC_CTYPE affects tutorial language
References: <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
X-Yow: Go on, EMOTE!  I was RAISED on thought balloons!!
Date: Tue, 27 Jun 2017 17:13:13 +0200
In-Reply-To: <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN> (Leonard
 Lausen's message of "Tue, 27 Jun 2017 23:48:41 +0900")
Message-ID: <mvmo9t9mpkm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

On Jun 27 2017, Leonard Lausen <leonard@HIDDEN> wrote:

> as far as I know the environment variable LC_CTYPE applies to
> classification and conversion of characters, and to multibyte and wide
> characters. So setting it should not influence the interface language,
> correct?

current-language-environment is set from LC_CTYPE, which also controls
the tutorial language.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@HIDDEN
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at 27505 <at> debbugs.gnu.org:


Received: (at 27505) by debbugs.gnu.org; 27 Jun 2017 15:05:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 27 11:05:47 2017
Received: from localhost ([127.0.0.1]:40991 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dPs3m-0000fg-Qw
	for submit <at> debbugs.gnu.org; Tue, 27 Jun 2017 11:05:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40144)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1dPs3l-0000fU-K9
 for 27505 <at> debbugs.gnu.org; Tue, 27 Jun 2017 11:05:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1dPs3c-0004ot-U2
 for 27505 <at> debbugs.gnu.org; Tue, 27 Jun 2017 11:05:40 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53958)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1dPs3c-0004oY-Qo; Tue, 27 Jun 2017 11:05:36 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4394
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1dPs3c-0006sW-68; Tue, 27 Jun 2017 11:05:36 -0400
Date: Tue, 27 Jun 2017 18:05:27 +0300
Message-Id: <8337alsc7c.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Leonard Lausen <leonard@HIDDEN>
In-reply-to: <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN> (message from
 Leonard Lausen on Tue, 27 Jun 2017 23:48:41 +0900)
Subject: Re: bug#27505: LC_CTYPE affects tutorial language
References: <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27505
Cc: 27505 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Leonard Lausen <leonard@HIDDEN>
> Date: Tue, 27 Jun 2017 23:48:41 +0900
> 
> as far as I know the environment variable LC_CTYPE applies to
> classification and conversion of characters, and to multibyte and wide
> characters. So setting it should not influence the interface language,
> correct?
> 
> However, with the following locale:
> LANG=en_US.UTF-8
> LC_CTYPE=zh_CN.UTF-8
> LC_NUMERIC="en_US.UTF-8"
> LC_TIME="en_US.UTF-8"
> LC_COLLATE=C
> LC_MONETARY="en_US.UTF-8"
> LC_MESSAGES="en_US.UTF-8"
> LC_PAPER="en_US.UTF-8"
> LC_NAME="en_US.UTF-8"
> LC_ADDRESS="en_US.UTF-8"
> LC_TELEPHONE="en_US.UTF-8"
> LC_MEASUREMENT="en_US.UTF-8"
> LC_IDENTIFICATION="en_US.UTF-8"
> LC_ALL=
> 
> I find that the emacs tutorial (C-h t) is displayed in Chinese.
> 
> Is this expected behavior or a bug?

It's the intended behavior: LC_CTYPE affects the language environment
which Emacs sets up by default.  From the Emacs manual:

     Some operating systems let you specify the character-set locale you
  are using by setting the locale environment variables ‘LC_ALL’,
  ‘LC_CTYPE’, or ‘LANG’.  (If more than one of these is set, the first one
  that is nonempty specifies your locale for this purpose.)  During
  startup, Emacs looks up your character-set locale’s name in the system
  locale alias table, matches its canonical name against entries in the
  value of the variables ‘locale-charset-language-names’ and
  ‘locale-language-names’ (the former overrides the latter), and selects
  the corresponding language environment if a match is found.  It also
  adjusts the display table and terminal coding system, the locale coding
  system, the preferred coding system as needed for the locale, and—last
  but not least—the way Emacs decodes non-ASCII characters sent by your
  keyboard.

And the language environment includes a setting for the default
tutorial.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Jun 2017 14:49:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 27 10:49:08 2017
Received: from localhost ([127.0.0.1]:40971 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dPrng-0000GU-D7
	for submit <at> debbugs.gnu.org; Tue, 27 Jun 2017 10:49:08 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33369)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leonard@HIDDEN>) id 1dPrnf-0000G1-2Z
 for submit <at> debbugs.gnu.org; Tue, 27 Jun 2017 10:49:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <leonard@HIDDEN>) id 1dPrnY-0007Ou-LK
 for submit <at> debbugs.gnu.org; Tue, 27 Jun 2017 10:49:02 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43831)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <leonard@HIDDEN>) id 1dPrnY-0007OI-Gt
 for submit <at> debbugs.gnu.org; Tue, 27 Jun 2017 10:49:00 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52557)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <leonard@HIDDEN>) id 1dPrnW-0004La-Mk
 for bug-gnu-emacs@HIDDEN; Tue, 27 Jun 2017 10:49:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <leonard@HIDDEN>) id 1dPrnS-00077l-Hi
 for bug-gnu-emacs@HIDDEN; Tue, 27 Jun 2017 10:48:58 -0400
Received: from hercules.uberspace.de ([95.143.172.224]:44302)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <leonard@HIDDEN>) id 1dPrnS-0006zf-6L
 for bug-gnu-emacs@HIDDEN; Tue, 27 Jun 2017 10:48:54 -0400
Received: (qmail 16613 invoked from network); 27 Jun 2017 14:48:47 -0000
Received: from localhost (HELO ?192.168.0.37?) (127.0.0.1)
 by hercules.uberspace.de with SMTP; 27 Jun 2017 14:48:47 -0000
To: bug-gnu-emacs@HIDDEN
From: Leonard Lausen <leonard@HIDDEN>
Subject: LC_CTYPE affects tutorial language
Message-ID: <44eb186d-db67-3e93-31cd-8260f5df7781@HIDDEN>
Date: Tue, 27 Jun 2017 23:48:41 +0900
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Dear all,

as far as I know the environment variable LC_CTYPE applies to
classification and conversion of characters, and to multibyte and wide
characters. So setting it should not influence the interface language,
correct?

However, with the following locale:
LANG=en_US.UTF-8
LC_CTYPE=zh_CN.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

I find that the emacs tutorial (C-h t) is displayed in Chinese.

Is this expected behavior or a bug? This may or may not be related to
bug#27312 where I reported that I can't activate fcitx even though env
is set up correctly.

(I.e. the following is the first line of the displayed tutorial:
Emacs 快速指南.(查看版权声明请至本文末尾))


> 
> In GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.15)
>  of 2017-06-10 built on leonard-xps13
> Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
> Configured using:
>  'configure --prefix=/usr --build=x86_64-pc-linux-gnu
>  --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
>  --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
>  --localstatedir=/var/lib --disable-dependency-tracking
>  --disable-silent-rules --docdir=/usr/share/doc/emacs-25.2
>  --htmldir=/usr/share/doc/emacs-25.2/html --libdir=/usr/lib64
>  --program-suffix=-emacs-25 --infodir=/usr/share/info/emacs-25
>  --localstatedir=/var
>  --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
>  --with-gameuser=:gamestat --without-compress-install
>  --with-file-notification=inotify --enable-acl --with-dbus
>  --with-modules --with-gpm --without-hesiod --without-kerberos
>  --without-kerberos5 --with-xml2 --without-selinux --with-gnutls
>  --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns
>  --with-gconf --with-gsettings --without-toolkit-scroll-bars --with-gif
>  --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm
>  --with-imagemagick --with-xft --without-cairo --with-libotf
>  --with-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets
>  GENTOO_PACKAGE=app-editors/emacs-25.2 'CFLAGS=-march=native
>  -mtune=native -O2 -pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''
> 
> Configured features:
> XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
> NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB GTK3 X11
> MODULES
> 
> Important settings:
>   value of $LC_COLLATE: C
>   value of $LC_CTYPE: zh_CN.UTF-8
>   value of $LANG: en_US.UTF-8
>   value of $XMODIFIERS: @im=fcitx
>   locale-coding-system: utf-8-unix
> 
> Major mode: Lisp Interaction
> 
> Minor modes in effect:
>   tooltip-mode: t
>   global-eldoc-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   tool-bar-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
> 
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
> Making completion list... [2 times]
> delete-backward-char: Text is read-only [3 times]
> Making completion list...
> 
> Load-path shadows:
> None found.
> 
> Features:
> (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
> mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
> mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
> rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
> cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util
> china-util tooltip eldoc electric uniquify ediff-hook vc-hooks
> lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
> image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
> prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
> mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
> georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
> korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
> european ethiopic indian cyrillic chinese charscript case-table epa-hook
> jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
> loaddefs button faces cus-face macroexp files text-properties overlay
> sha1 md5 base64 format env code-pages mule custom widget
> hashtable-print-readable backquote dbusbind inotify dynamic-setting
> system-font-setting font-render-setting move-toolbar gtk x-toolkit x
> multi-tty make-network-process emacs)
> 
> Memory information:
> ((conses 16 86605 6233)
>  (symbols 48 19787 0)
>  (miscs 40 46 96)
>  (strings 32 14398 4574)
>  (string-bytes 1 414247)
>  (vectors 16 12192)
>  (vector-slots 8 484142 16017)
>  (floats 8 167 9)
>  (intervals 56 279 0)
>  (buffers 976 19)
>  (heap 1024 16015 1078)




Acknowledgement sent to Leonard Lausen <leonard@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#27505; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.