unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: eggert@cs.ucla.edu
Cc: emacs-devel@gnu.org
Subject: Re: commit-msg hook
Date: Sat, 11 Apr 2015 12:59:50 +0300	[thread overview]
Message-ID: <838udzf0ix.fsf@gnu.org> (raw)
In-Reply-To: <83a8yff0pl.fsf@gnu.org>

> Date: Sat, 11 Apr 2015 12:55:50 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> 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 = "¢"
> 
> 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 not
> recognized as such, and a UTF-8 locale cannot be used on MS-Windows to
> force that.

Would it be too expensive to use Emacs for detecting unprintable
characters, instead of the shell and Awk?  All those issues with
handling UTF-8 encoded characters correctly and portability issues
will then simply disappear.




  reply	other threads:[~2015-04-11  9:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 10:43 commit-msg hook Eli Zaretskii
2015-04-10 18:23 ` Johan Bockgård
2015-04-11  2:42 ` Paul Eggert
2015-04-11  7:24   ` Eli Zaretskii
2015-04-11  9:55     ` Eli Zaretskii
2015-04-11  9:59       ` Eli Zaretskii [this message]
2015-04-11 12:42         ` Dmitry Gutov
2015-04-11 14:29           ` Eli Zaretskii
2015-04-11 15:13             ` Dmitry Gutov
2015-04-11 15:17               ` Eli Zaretskii
2015-04-12  3:36                 ` Stefan Monnier
2015-04-12 18:54                   ` chad
2015-04-11 15:40       ` Paul Eggert
2015-04-11 16:40         ` Eli Zaretskii
2015-04-11 20:09           ` Paul Eggert
2015-04-12 16:10             ` Eli Zaretskii
2015-04-13 15:48             ` Eli Zaretskii
2015-04-13 18:37               ` Paul Eggert
2015-04-13 20:18                 ` Eli Zaretskii
2015-04-13 21:19                   ` Paul Eggert
2015-04-14 15:08                     ` Eli Zaretskii
2015-04-14 17:01                       ` Paul Eggert
2015-04-14 17:09                         ` Eli Zaretskii
2015-04-14 17:42                           ` Paul Eggert
2015-04-14 18:01                             ` Eli Zaretskii
2015-04-14 18:32                               ` Paul Eggert
2015-04-14 18:59                                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838udzf0ix.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).