From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: commit-msg hook Date: Sat, 11 Apr 2015 12:55:50 +0300 Message-ID: <83a8yff0pl.fsf@gnu.org> References: <83y4m0tgac.fsf@gnu.org> <55288A2D.5030809@cs.ucla.edu> <83d23bruui.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1428746167 20872 80.91.229.3 (11 Apr 2015 09:56:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Apr 2015 09:56:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: eggert@cs.ucla.edu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 11 11:55:58 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ygs8r-0002SI-Hz for ged-emacs-devel@m.gmane.org; Sat, 11 Apr 2015 11:55:57 +0200 Original-Received: from localhost ([::1]:42222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ygs8q-0005IU-SL for ged-emacs-devel@m.gmane.org; Sat, 11 Apr 2015 05:55:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ygs8n-0005IF-2d for emacs-devel@gnu.org; Sat, 11 Apr 2015 05:55:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ygs8j-0004iB-6I for emacs-devel@gnu.org; Sat, 11 Apr 2015 05:55:53 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:61296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ygs8i-0004fX-UP for emacs-devel@gnu.org; Sat, 11 Apr 2015 05:55:49 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NMM00L00Z9W6Z00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Sat, 11 Apr 2015 12:55:47 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NMM00LE1ZKY0MA0@a-mtaout23.012.net.il>; Sat, 11 Apr 2015 12:55:47 +0300 (IDT) In-reply-to: <83d23bruui.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185279 Archived-At: > Date: Sat, 11 Apr 2015 10:24:05 +0300 > From: Eli Zaretskii > Cc: bojohan@gnu.org, emacs-devel@gnu.org >=20 > However, the new hook hangs on Windows, in this line: >=20 > print_at_sign=3D'{print substr("'$cent_sign'@", 2)}' >=20 > It hangs with both MSYS and native Gawk, including the native build= of > the latest Gawk 4.1.1c. >=20 > I don't think that UTF-8 will work reliabloy in MS-Windows Gawk, > certainly not with Gawk that comes with msysGit. Digging a bit deeper, I see that the problem with hanging is not due to Gawk, but instead due to 'printf': it doesn't produce the UTF-8 encoding of the percent sign, but some invalid sequence instead. If I add an explicit cent_sign =3D "=C2=A2" to the Awk part of the script (where the cent sign is UTF-8 encoded), then the hook correctly processes log messages with UTF-8 encoded non-ASCII letters and doesn't hang. It doesn't use the [[:print:]] alternative, though, probably because UTF-8 encoded characters are no= t recognized as such, and a UTF-8 locale cannot be used on MS-Windows t= o force that.