GNU bug report logs - #3616
23.0.94; vc-bzr coding system bug

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; Reported by: 端瑞 <duanpanda@HIDDEN>; dated Fri, 19 Jun 2009 08:30:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 3616@HIDDEN:


Received: (at 3616) by emacsbugs.donarmstrong.com; 23 Jun 2009 02:40:04 +0000
From duanpanda@HIDDEN Mon Jun 22 19:40:03 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-0.9 required=4.0 tests=AWL,GMAIL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5N2dvLB010433
	for <3616@HIDDEN>; Mon, 22 Jun 2009 19:39:58 -0700
Received: by wa-out-1112.google.com with SMTP id m28so483761wag.1
        for <3616@HIDDEN>; Mon, 22 Jun 2009 19:39:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :date:message-id:subject:from:to:cc:content-type
         :content-transfer-encoding;
        bh=DuRc9KMTDblIFpCbSJnNPjguY7oOqigPA+N5/6ubgss=;
        b=R06/D9A+8CNbSy0iCO3aGePioxA95Rm99INKH62P+oUuQN+pe5ldT0BmX6bMJUTBB4
         4LVRMGRx+Ag8JqWG37Kutu9G6LSkxo/7lmWhZfeS8mqirlCNhcyKYw82SGEG8ZCYpKka
         0JrDxo7n3zecY03bYKAv9ekBKWb+r8MZpdNro=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :cc:content-type:content-transfer-encoding;
        b=CeCq9IM/C8OelZt/s3tbXo8BdmV65d7FvYPogIx2Sos0U15XiOY2WF+8yVOm0kHVa8
         vPtC9Ba+X8+rBdIy92gQzXD3iZpuPIJ6QHd/VO1WWNaT6P2/1+hMYqC8MzeJN/IupeBN
         EwPSz6Aa2bLyAqBXw6Q64ETRzoymIiKR11f+0=
MIME-Version: 1.0
Received: by 10.114.172.2 with SMTP id u2mr6083260wae.126.1245724797290; Mon, 
	22 Jun 2009 19:39:57 -0700 (PDT)
In-Reply-To: <m2k534kv3y.fsf@HIDDEN>
References: <30dcab0d0906190124s606e571ep288130d84a250760@HIDDEN>
	 <E1MHcvm-00065A-KQ@HIDDEN>
	 <30dcab0d0906202300n3f64dac5i54b79932bcfcf4fb@HIDDEN>
	 <30dcab0d0906211901n646f348bu4e6c80bafe5ba780@HIDDEN>
	 <m2k534kv3y.fsf@HIDDEN>
Date: Tue, 23 Jun 2009 10:39:57 +0800
Message-ID: <30dcab0d0906221939s3b946721lfaadc54aeadda8e9@HIDDEN>
Subject: Re: bug#3616: 23.0.94; vc-bzr coding system bug
From: Ryan Duan <duanpanda@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
Cc: 3616 <at> debbugs.gnu.org
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: quoted-printable

(chinese-gbk-dos . undecided-dos)

2009/6/23 Andreas Schwab <schwab@HIDDEN>:
> Ryan Duan <duanpanda@HIDDEN> writes:
>
>> EXAMPLE 3 (Another related bug)
>> --------------------------------
>> In Windows, I created a directory (folder) named "=B5=DA=B6=FE".
>> In dired, it works all right.
>> But in *shell*,
>> d:\>cd =B5=DA=B6=FE
>> cd =E7=AC =BA=8C
>> =CF=B5=CD=B3=D5=D2=B2=BB=B5=BD=D6=B8=B6=A8=B5=C4=C2=B7=BE=B6=A1=A3
>>
>> It complains that the system cannot find the specified path.  Because
>> the "\xb5\xda\xb6\xfe"(Chinese GBK) is converted to
>> ''\xe7\xac\xac\xe4\xba\x8c''(UTF-8) to pass to the SHELL, but the
>> SHELL can only process Chinese GBK characters.
>
> What does (process-coding-system (get-buffer-process "*shell*")) return?
>
> Andreas.
>
> --
> Andreas Schwab, schwab@HIDDEN
> GPG Key fingerprint =3D 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED=
5
> "And now for something completely different."
>



Acknowledgement sent to Ryan Duan <duanpanda@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3616; Package emacs. Full text available.

Message received at 3616@HIDDEN:


Received: (at 3616) by emacsbugs.donarmstrong.com; 22 Jun 2009 17:59:44 +0000
From whitebox@HIDDEN Mon Jun 22 10:59:44 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,GMAIL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5MHxdVT015446
	for <3616@HIDDEN>; Mon, 22 Jun 2009 10:59:40 -0700
Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149])
	by mail-out.m-online.net (Postfix) with ESMTP id 73A341C000A8;
	Mon, 22 Jun 2009 19:59:37 +0200 (CEST)
Received: from localhost (dynscan2.mnet-online.de [192.168.1.215])
	by mail.m-online.net (Postfix) with ESMTP id 0C67290284;
	Mon, 22 Jun 2009 19:59:37 +0200 (CEST)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.3.149])
	by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024)
	with ESMTP id jQzxuMdjBTSF; Mon, 22 Jun 2009 19:59:36 +0200 (CEST)
Received: from igel.home (DSL01.83.171.188.222.ip-pool.NEFkom.net [83.171.188.222])
	by mail.mnet-online.de (Postfix) with ESMTP;
	Mon, 22 Jun 2009 19:59:35 +0200 (CEST)
Received: by igel.home (Postfix, from userid 501)
	id 9DE93C8316; Mon, 22 Jun 2009 19:59:31 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
To: Ryan Duan <duanpanda@HIDDEN>
Cc: 3616 <at> debbugs.gnu.org
Subject: Re: bug#3616: 23.0.94; vc-bzr coding system bug
References: <30dcab0d0906190124s606e571ep288130d84a250760@HIDDEN>
	<E1MHcvm-00065A-KQ@HIDDEN>
	<30dcab0d0906202300n3f64dac5i54b79932bcfcf4fb@HIDDEN>
	<30dcab0d0906211901n646f348bu4e6c80bafe5ba780@HIDDEN>
X-Yow: My forehead feels like a PACKAGE of moist CRANBERRIES in a remote
 FRENCH OUTPOST!!
Date: Mon, 22 Jun 2009 19:59:29 +0200
In-Reply-To: <30dcab0d0906211901n646f348bu4e6c80bafe5ba780@HIDDEN>
	(Ryan Duan's message of "Mon, 22 Jun 2009 10:01:51 +0800")
Message-ID: <m2k534kv3y.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Ryan Duan <duanpanda@HIDDEN> writes:

> EXAMPLE 3 (Another related bug)
> --------------------------------
> In Windows, I created a directory (folder) named "第二".
> In dired, it works all right.
> But in *shell*,
> d:\>cd 第二
> cd 绗 簩
> 系统找不到指定的路径。
>
> It complains that the system cannot find the specified path.  Because
> the "\xb5\xda\xb6\xfe"(Chinese GBK) is converted to
> ''\xe7\xac\xac\xe4\xba\x8c''(UTF-8) to pass to the SHELL, but the
> SHELL can only process Chinese GBK characters.

What does (process-coding-system (get-buffer-process "*shell*")) return?

Andreas.

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



Acknowledgement sent to Andreas Schwab <schwab@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3616; Package emacs. Full text available.

Message received at 3616@HIDDEN:


Received: (at 3616) by emacsbugs.donarmstrong.com; 22 Jun 2009 02:01:57 +0000
From duanpanda@HIDDEN Sun Jun 21 19:01:56 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-0.9 required=4.0 tests=FOURLA,GMAIL,HAS_BUG_NUMBER,
	IMPRONONCABLE_2 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5M21p3Z004749
	for <3616@HIDDEN>; Sun, 21 Jun 2009 19:01:53 -0700
Received: by qw-out-2122.google.com with SMTP id 5so1524012qwd.13
        for <3616@HIDDEN>; Sun, 21 Jun 2009 19:01:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :date:message-id:subject:from:to:content-type
         :content-transfer-encoding;
        bh=HFPk3hylXN7HopIccR2u+cJ0psVn+vbRDxykNcAziVk=;
        b=obBSLHQPHpqTt+NHSCa/BvC2qDgGXhLIU8ImuQDDzNibNHObFRLifJvpIQtakRFs5b
         81AgudrsqqACU80jSWzfva+kCJ3oUeXxE4LclE0skRq+dsKLi7l/YcFrFs9zxPsYmrtB
         F/yxAEnzhCFZwOAc35DzoENBpOobhfJKMYCmY=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type:content-transfer-encoding;
        b=Ng45vx9bOiE3xEXFGLJr9aTuV6halmIEwHBDRfzQwyKUTQZVWG+/ceV7ao82ovswVg
         skQvcykpUtsQ+TWOUm44CWz+1/Tf6ypP6FHGSJqscHbpZdtHm6eqRWNWGDues/++7OAD
         SUg3FlFXSZ5SqsODfqVvwG9kRlKNG42tJUKCc=
MIME-Version: 1.0
Received: by 10.224.28.210 with SMTP id n18mr2471978qac.19.1245636111637; Sun, 
	21 Jun 2009 19:01:51 -0700 (PDT)
In-Reply-To: <30dcab0d0906202300n3f64dac5i54b79932bcfcf4fb@HIDDEN>
References: <30dcab0d0906190124s606e571ep288130d84a250760@HIDDEN>
	 <E1MHcvm-00065A-KQ@HIDDEN>
	 <30dcab0d0906202300n3f64dac5i54b79932bcfcf4fb@HIDDEN>
Date: Mon, 22 Jun 2009 10:01:51 +0800
Message-ID: <30dcab0d0906211901n646f348bu4e6c80bafe5ba780@HIDDEN>
Subject: bug#3616: 23.0.94; vc-bzr coding system bug
From: Ryan Duan <duanpanda@HIDDEN>
To: 3616 <at> debbugs.gnu.org
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: quoted-printable

It works from the command line which is part of Windows XP and uses
Windows ANSI coding system.  Windows command line seems use cp936 as
the coding system.
The value of buffer-file-coding-system in the *shell* buffer is
chinese-gbk-dos, one of whose alias is cp936-dos.  It doesn't help to
change it to any of cp936 nor chinese-iso-8bit.

I observe that *shell* and *VC-log* buffers pass UTF-8 encoded string
(Is Emacs's internal buffer code UTF-8?) to Windows command line,
which might be the real cause of this bug and other related bugs.
Three examples following.

EXAMPLE 1
--------------------------------
In *shell*,
d:\code>bzr commit -m "=B5=DA=B6=FE"
bzr commit -m "=E7=AC =BA=8C"
Traceback (most recent call last):
 File "bzr", line 130, in <module>
 File "bzrlib\commands.pyo", line 969, in main
bzrlib.errors.BzrError: Parameter ''\xe7\xac\xac\xe4\xba\x8c'' is
unsupported by the current encoding.

Notice ''\xe7\xac\xac\xe4\xba\x8c'' which is the UTF-8 encoding of my
inputted Chinese characters.  It was these UTF-8 string causing the
above error.

Apply C-u C-x =3D on the Chinese character "=B5=DA":
       character: =B5=DA (31532, #o75454, #x7b2c)
preferred charset: chinese-gbk (GBK Chinese simplified.)
      code point: 0xB5DA
          syntax: w    which means: word
        category:
                  .:Base, C:2-byte han, c:Chinese, h:Korean,
j:Japanese, |:line breakable
     buffer code: #xE7 #xAC #xAC
       file code: #xB5 #xDA (encoded by coding system chinese-gbk-dos)
         display: by this font (glyph code)
   uniscribe:-outline-=D0=C2=CB=CE=CC=E5-normal-normal-normal-mono-13-*-*-*=
-c-*-gb2312.1980-0
(#x3100)

Notice its buffer code is "\xe7\xac\xac" which is the first substring
of ''\xe7\xac\xac\xe4\xba\x8c''.  The file code "\xb5\xda" is
chinse-gbk encoded, and is what I expect to pass to the command line
system in Windows, which might work correctly.  But unfortunately,
instead of passing Chinese GBK encoded string to SHELL, Emacs passes
UTF-8 encoded string to SHELL.

EXAMPLE 2
--------------------------------
In *VC-log* buffer, I inputted two Chinese characters "=B5=DA=B6=FE" which =
was
the same as that in EXAMPLE 1.
After C-c C-c, the same error occurs: bzrlib.errors.BzrError:
Parameter ''\xe7\xac\xac\xe4\xba\x8c'' is unsupported by the current
encoding.
Apply C-u C-x =3D on "=B5=DA" returned the same information as that in EXAM=
PLE 1.

EXAMPLE 3 (Another related bug)
--------------------------------
In Windows, I created a directory (folder) named "=B5=DA=B6=FE".
In dired, it works all right.
But in *shell*,
d:\>cd =B5=DA=B6=FE
cd =E7=AC =BA=8C
=CF=B5=CD=B3=D5=D2=B2=BB=B5=BD=D6=B8=B6=A8=B5=C4=C2=B7=BE=B6=A1=A3

It complains that the system cannot find the specified path.  Because
the "\xb5\xda\xb6\xfe"(Chinese GBK) is converted to
''\xe7\xac\xac\xe4\xba\x8c''(UTF-8) to pass to the SHELL, but the
SHELL can only process Chinese GBK characters.

CONCLUSION
--------------------------------
When we use Emacs on Chinese Windows, Chinese GBK characters are
converted to UTF-8 characters to pass to Windows command line, but
Windows command line cannot process UTF-8 characters, which causes
this bug and other related bugs.

I feel that this is not a small problem.  Emacs should detect the OS's
locale, then use the correct encoding system to interact with the OS.
It seems to do well on Linux but badly on Windows.  Dired seems do
well on Windows but shell.el and vc-bzr.el do badly.  I didn't test
other vc-* modes.

I hope the information above will help solve this problem.  Thank you!
HAPPY HACKING!

2009/6/19 Eli Zaretskii <eliz@HIDDEN>:
>> Date: Fri, 19 Jun 2009 16:24:37 +0800
>> From: =3D?UTF-8?Q?=3DE7=3DAB=3DAF=3DE7=3D91=3D9E?=3D <duanpanda@HIDDEN=
m>
>> Cc:
>> Reply-To: =3D?UTF-8?Q?=3DE7=3DAB=3DAF=3DE7=3D91=3D9E?=3D <duanpanda@gmai=
l.com>,
>>       3616@HIDDEN

> Does it work for you from the command line?  If it does, what encoding
> of Chinese do you use in that case?
>
> What is the value of buffer-file-coding-system in the *shell* buffer?
> Does it help to change it to cp936?



Acknowledgement sent to Ryan Duan <duanpanda@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3616; Package emacs. Full text available.

Message received at 3616@HIDDEN:


Received: (at 3616) by emacsbugs.donarmstrong.com; 19 Jun 2009 12:11:00 +0000
From eliz@HIDDEN Fri Jun 19 05:11:00 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.2 required=4.0 tests=AWL,GMAIL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5JCAtFA021246
	for <3616@HIDDEN>; Fri, 19 Jun 2009 05:10:56 -0700
Received: from eliz by fencepost.gnu.org with local (Exim 4.67)
	(envelope-from <eliz@HIDDEN>)
	id 1MHcvm-00065A-KQ; Fri, 19 Jun 2009 08:10:54 -0400
From: Eli Zaretskii <eliz@HIDDEN>
To: =?UTF-8?Q?=E7=AB=AF=E7=91=9E?= <duanpanda@HIDDEN>,
        3616 <at> debbugs.gnu.org
In-reply-to: <30dcab0d0906190124s606e571ep288130d84a250760@HIDDEN>
	(message from =?UTF-8?Q?=E7=AB=AF=E7=91=9E?= on Fri, 19 Jun 2009
	16:24:37 +0800)
Subject: Re: bug#3616: 23.0.94; vc-bzr coding system bug
Reply-to: Eli Zaretskii <eliz@HIDDEN>
References: <30dcab0d0906190124s606e571ep288130d84a250760@HIDDEN>
Message-Id: <E1MHcvm-00065A-KQ@HIDDEN>
Date: Fri, 19 Jun 2009 08:10:54 -0400

> Date: Fri, 19 Jun 2009 16:24:37 +0800
> From: =?UTF-8?Q?=E7=AB=AF=E7=91=9E?= <duanpanda@HIDDEN>
> Cc: 
> Reply-To: =?UTF-8?Q?=E7=AB=AF=E7=91=9E?= <duanpanda@HIDDEN>,
> 	3616@HIDDEN
> 
> In short, the bug is, when I use Chinese, it cannot commit successfully.
> The version of my bazaar is 1.15.

Does it work for you from the command line?  If it does, what encoding
of Chinese do you use in that case?

> Next I will show 3 bazaar sessions and their bzr log, 1 and 3 are with this bug.
> Obviously, the command string passed from Emacs to bazaar was wrongly encoded.
> 
> 1. When I run the command bzr commit in Emacs *shell* buffer, my
> comment message is written in Chinese, the result was:

What is the value of buffer-file-coding-system in the *shell* buffer?
Does it help to change it to cp936?



Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3616; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 19 Jun 2009 08:24:51 +0000
From duanpanda@HIDDEN Fri Jun 19 01:24:50 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.2 required=4.0 tests=AWL,FOURLA,MURPHY_WRONG_WORD1,
	MURPHY_WRONG_WORD2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5J8OhK9011442
	for <submit@HIDDEN>; Fri, 19 Jun 2009 01:24:44 -0700
Received: from mail.gnu.org ([199.232.76.166]:44393 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <duanpanda@HIDDEN>)
	id 1MHZOs-0007Su-DU
	for emacs-pretest-bug@HIDDEN; Fri, 19 Jun 2009 04:24:42 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <duanpanda@HIDDEN>)
	id 1MHZOq-0001Yp-LE
	for emacs-pretest-bug@HIDDEN; Fri, 19 Jun 2009 04:24:42 -0400
Received: from wa-out-1112.google.com ([209.85.146.177]:41551)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <duanpanda@HIDDEN>)
	id 1MHZOq-0001YL-1S
	for emacs-pretest-bug@HIDDEN; Fri, 19 Jun 2009 04:24:40 -0400
Received: by wa-out-1112.google.com with SMTP id m34so373165wag.26
        for <emacs-pretest-bug@HIDDEN>; Fri, 19 Jun 2009 01:24:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:date:message-id:subject
         :from:to:content-type:content-transfer-encoding;
        bh=IYLf/fi/rX4G6OHtz9YQ78XeLJqxwRjOAQKz93Pau3w=;
        b=jKSJVFmzmTIYDpvtE8qaNlh2ga9VNThDVgY0jsjW4Bd5T2XlUsx6Emv5CuhgvXx1xU
         jRb5yodBDA9he9OPGFz9BPdp4Asghxrk4EH5H6EkJMq9/wTrLlGtX18Bco0dUsx0EEAr
         yLHd7/F+AChrXslLV/lW8woU01FFfWRxdjxMY=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:date:message-id:subject:from:to:content-type
         :content-transfer-encoding;
        b=WFoS5BYfHid/PpWsyLOqgpGOyUxse9AgkumHtjIoO1gNst0HWnxyyrpbZedLHVd9ac
         pxHLJdSpDABGOGq9MaCb+Qq2BxwC3uZIVnmCFGAZ5yD9vzTgmK67GSUTbSW8u3j82/fo
         lx6zkxnb8Gayi1mfheosBykblV8AEU0L5/0wk=
MIME-Version: 1.0
Received: by 10.114.113.16 with SMTP id l16mr3676898wac.21.1245399878032; Fri, 
	19 Jun 2009 01:24:38 -0700 (PDT)
Date: Fri, 19 Jun 2009 16:24:37 +0800
Message-ID: <30dcab0d0906190124s606e571ep288130d84a250760@HIDDEN>
Subject: 23.0.94; vc-bzr coding system bug
From: =?GB2312?B?tsvI8A==?= <duanpanda@HIDDEN>
To: emacs-pretest-bug@HIDDEN
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized.

In short, the bug is, when I use Chinese, it cannot commit successfully.
The version of my bazaar is 1.15.

Next I will show 3 bazaar sessions and their bzr log, 1 and 3 are with this=
 bug.
Obviously, the command string passed from Emacs to bazaar was wrongly encod=
ed.

1. When I run the command bzr commit in Emacs *shell* buffer, my
comment message is written in Chinese, the result was:
--------------------------------
d:\ehome\5-Dev\Mobile\Brew\Ver0.9\ehome>bzr commit -m
"=D0=DE=D5=FD=C1=CB=C1=AA=CF=B5=C8=CB=C1=D0=B1=ED=B5=C4=BD=B9=B5=E3=D2=C6=
=B6=AF=CE=CA=CC=E2=BA=CD=B0=B4#=BC=FC=CA=B1=B5=C4=B2=CB=B5=A5=B8=FC=D0=C2=
=CE=CA=CC=E2=A1=A3"
bzr commit -m "=E4=BF  =E4=BA=86=E8=81=94=E7=B3=BB=E4=BA=BA=E5=88=97=E8=A1=
=A8=E7=9A=84=E7=84=A6=E7=82=B9=E7=A7=BB=E5=8A=A8=E9=97=AE=E9=A2=98=E5=92=8C=
=E6=8C?=E9=94 =97=B6=E7=9A=84=E8=8F=9C=E5=8D=95=E6=9B=B4=E6=96=B0=E9=97=AE=
=E9=A2=98=E3 ?
Traceback (most recent call last):
 File "bzr", line 130, in <module>
 File "bzrlib\commands.pyo", line 969, in main
bzrlib.errors.BzrError: Parameter
''\xe4\xbf\xae\xe6\xad\xa3\xe4\xba\x86\xe8\x81\x94\xe7\xb3\xbb\xe4\xba\xba\=
xe5\x88\x97\xe8\xa1\xa8\xe7\x9a\x84\xe7\x84\xa6\xe7\x82\xb9\xe7\xa7\xbb\xe5=
\x8a\xa8\xe9\x97\xae\xe9\xa2\x98\xe5\x92\x8c\xe6\x8c?\xe9\x94\xae\xe6\x97\x=
b6\xe7\x9a\x84\xe8\x8f\x9c\xe5\x8d\x95\xe6\x9b\xb4\xe6\x96\xb0\xe9\x97\xae\=
xe9\xa2\x98\xe3\x80?''
is unsupported by the current encoding.
--------------------------------
I run the above command twice.  Both got the same result.  There was
no bzr log  for these two operations in the file .bzr.log.

2. It could not commit until I changed the comment message to English:
--------------------------------
d:\ehome\5-Dev\Mobile\Brew\Ver0.9\ehome>bzr commit -m "Fixed the focus
move problems in the contact list and the update problem on the menu
bar when # key is clicked."
bzr commit -m "Fixed the focus move problems in the contact list and
the update problem on the menu bar when # key is clicked."
Committing to: D:/ehome/5-Dev/Mobile/Brew/Ver0.9/ehome/
modified .bzrignore
modified App/ChattingListBox.h
modified App/ChattingListBox.inl
modified App/EhomeAppLayer.h
modified App/EhomeAppLayer.inl
modified App/EhomeAppLayer_Session.inl
modified App/SipPriorityTable.h
modified App/StructInfo/Message.h
modified App/StructInfo/Message.inl
modified App/StructInfo/session.inl
modified AppUI/ChattingListBoxItem.inl
modified AppUI/ChattingTabPage.h
modified AppUI/ChattingTabPage.inl
modified AppUI/ContactsListTabPage.inl
modified AppUI/ContactsListTree.inl
modified AppUI/FormChat.inl
modified AppUI/MsgItemTrans.inl
modified AppUI/SendTakePic.inl
modified AppUI/SetInfoTakePic.inl
modified AppUI/TreeViewWithAds.h
modified AppUI/TreeViewWithAds.inl
modified AppUI/WithAdItemListbox.inl
modified AppUI/AdsUI/AdsAction.h
modified AppUI/AdsUI/AdsAction.inl
modified AppUI/AdsUI/AdsComm.inl
modified AppUI/AdsUI/AdsHttpRequest.h
modified AppUI/AdsUI/AdsHttpRequest.inl
modified AppUI/AdsUI/AdsItemPainter.h
modified AppUI/AdsUI/AdsItemPainter.inl
modified common/SaveRecord.inl
modified common/config.h
modified common/ehomesound.h
modified common/ehomesound.inl
modified common/logger.inl
modified common/sound.inl
modified common/util.h
modified common/util.inl
modified common/net/MySocket.inl
modified common/stl/astringbuilder.inl
modified common/stl/wstring.h
added doc/contacts_focus.txt
added doc/tilemgr_test_cases.html
Committed revision 56.
--------------------------------

The log in .bzr.log is:
--------------------------------
=D0=C7=C6=DA=CE=E5 2009-06-19 15:46:19 +0800
0.125  bzr arguments: [u'commit', u'-m', u'Fixed the focus move
problems in the contact list and the update problem on the menu bar
when # key is clicked.']
0.140  looking for plugins in C:/Documents and
Settings/Ryan/Application Data/bazaar/2.0/plugins
0.140  looking for plugins in C:/Program Files/Bazaar/plugins
0.312  encoding stdout as osutils.get_user_encoding() 'cp936'
0.375  opening working tree 'D:/ehome/5-Dev/Mobile/Brew/Ver0.9/ehome'
0.437  preparing to commit
[ 4452] 2009-06-19 15:46:19.703 INFO: Committing to:
D:/ehome/5-Dev/Mobile/Brew/Ver0.9/ehome/
0.453  Selecting files for commit with filter []
[ 4452] 2009-06-19 15:46:19.875 INFO: modified .bzrignore
[ 4452] 2009-06-19 15:46:19.875 INFO: modified App/ChattingListBox.h
[ 4452] 2009-06-19 15:46:19.875 INFO: modified App/ChattingListBox.inl
[ 4452] 2009-06-19 15:46:19.875 INFO: modified App/EhomeAppLayer.h
[ 4452] 2009-06-19 15:46:19.875 INFO: modified App/EhomeAppLayer.inl
[ 4452] 2009-06-19 15:46:19.875 INFO: modified App/EhomeAppLayer_Session.in=
l
[ 4452] 2009-06-19 15:46:19.875 INFO: modified App/SipPriorityTable.h
[ 4452] 2009-06-19 15:46:19.890 INFO: modified App/StructInfo/Message.h
[ 4452] 2009-06-19 15:46:19.890 INFO: modified App/StructInfo/Message.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified App/StructInfo/session.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/ChattingListBoxItem.in=
l
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/ChattingTabPage.h
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/ChattingTabPage.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/ContactsListTabPage.in=
l
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/ContactsListTree.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/FormChat.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/MsgItemTrans.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/SendTakePic.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/SetInfoTakePic.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/TreeViewWithAds.h
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/TreeViewWithAds.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/WithAdItemListbox.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/AdsUI/AdsAction.h
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/AdsUI/AdsAction.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/AdsUI/AdsComm.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/AdsUI/AdsHttpRequest.h
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/AdsUI/AdsHttpRequest.i=
nl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/AdsUI/AdsItemPainter.h
[ 4452] 2009-06-19 15:46:19.890 INFO: modified AppUI/AdsUI/AdsItemPainter.i=
nl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified common/SaveRecord.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified common/config.h
[ 4452] 2009-06-19 15:46:19.890 INFO: modified common/ehomesound.h
[ 4452] 2009-06-19 15:46:19.890 INFO: modified common/ehomesound.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified common/logger.inl
[ 4452] 2009-06-19 15:46:19.890 INFO: modified common/sound.inl
[ 4452] 2009-06-19 15:46:19.905 INFO: modified common/util.h
[ 4452] 2009-06-19 15:46:19.905 INFO: modified common/util.inl
[ 4452] 2009-06-19 15:46:19.905 INFO: modified common/net/MySocket.inl
[ 4452] 2009-06-19 15:46:19.905 INFO: modified common/stl/astringbuilder.in=
l
[ 4452] 2009-06-19 15:46:19.905 INFO: modified common/stl/wstring.h
[ 4452] 2009-06-19 15:46:19.905 INFO: added doc/contacts_focus.txt
[ 4452] 2009-06-19 15:46:19.905 INFO: added doc/tilemgr_test_cases.html
[ 4452] 2009-06-19 15:46:20.733 INFO: Committed revision 56.
1.531  return code 0
--------------------------------

3. When I committed a single file from the *vc-dir* buffer using the v
shortcut, and write the message in Chinese, it also failed and
complained as follows:
--------------------------------
Traceback (most recent call last):
 File "bzr", line 130, in <module>
 File "bzrlib\commands.pyo", line 969, in main
bzrlib.errors.BzrError: Parameter
''\xe8\xaf\x95\xe8\xaf\x95\xe7\x94\xa8\xe4\xb8\xad\xe6\x96\x87\xe3\x80?''
is unsupported by the current encoding.
--------------------------------
It didn't generate any bzr log, either.



In GNU Emacs 23.0.94.1 (i386-mingw-nt5.1.2600)
of 2009-05-24 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

Important settings:
 value of $LC_ALL: nil
 value of $LC_COLLATE: nil
 value of $LC_CTYPE: nil
 value of $LC_MESSAGES: nil
 value of $LC_MONETARY: nil
 value of $LC_NUMERIC: nil
 value of $LC_TIME: nil
 value of $LANG: CHS
 value of $XMODIFIERS: nil
 locale-coding-system: cp936
 default-enable-multibyte-characters: t

Major mode: Shell

Minor modes in effect:
 diff-auto-refine-mode: t
 shell-dirtrack-mode: t
 desktop-save-mode: t
 show-paren-mode: t
 tooltip-mode: t
 tool-bar-mode: t
 mouse-wheel-mode: t
 menu-bar-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 font-lock-mode: t
 blink-cursor-mode: t
 global-auto-composition-mode: t
 auto-composition-mode: t
 auto-encryption-mode: t
 auto-compression-mode: t
 column-number-mode: t
 line-number-mode: t
 transient-mark-mode: t

Recent input:
p d a t e SPC p r <backspace> <backspace> p r o b l
e m SPC o n SPC t h e m <backspace> SPC m e n u SPC
b a r SPC w h e n SPC p r e s s i n g <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> # SPC k e y SPC i s SPC p r e s s e d .
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> c l i c k e d .
C-f <return> M-v M-v C-l C-h l C-x 1 C-h L <return>
C-x o v C-v M-v C-x k <return> C-x o C-x 1 C-h k C-x
<return> f C-x <return> C-h C-x <return> t C-g C-h
k C-x <return> t C-x o C-v M-v C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-n C-n C-n C-p C-p C-p C-p
C-p C-p C-p C-n <tab> <return> C-v C-x b <return> C-h
v t e r m i n a l <tab> <tab> <backspace> <backspace>
<backspace> <backspace> <backspace> c o <tab> <backspace>
<backspace> <tab> C-g C-x b <return> C-x b <return>
C-h v d e f a u l t SPC t e r <tab> <return> C-x 1
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
M-x f i n d SPC l i b <tab> <return> b z r <return>
M-x M-p <return> v c - v b <backspace> <backspace>
b a <backspace> z <tab> <return> C-v C-n C-n C-n C-n
C-n C-n C-n C-n C-f C-f C-f C-f C-f C-f <C-f2> <return>
M-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v
C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-x k <return>
M-x r e p o r t SPC <tab> <return>

Recent messages:
History item: 2
Quit [3 times]
History item: 1 [2 times]
Type C-x 1 to delete the help window, C-M-v to scroll help.
Buffer is read-only: #<buffer *Help*>
Type C-x 1 to delete the help window, C-M-v to scroll help.
Quit
mouse-2, RET: find function's definition
Quit
find-library-name: Can't find library bzr
call-interactively: End of buffer



Acknowledgement sent to 端瑞 <duanpanda@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3616; 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: Fri, 31 Oct 2014 17:00:04 UTC

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