unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: commit-msg hook
Date: Tue, 14 Apr 2015 10:42:53 -0700	[thread overview]
Message-ID: <552D519D.1000907@cs.ucla.edu> (raw)
In-Reply-To: <838udubprd.fsf@gnu.org>

On 04/14/2015 10:09 AM, Eli Zaretskii wrote:
>> This sort of thing should work in a unibyte environment, but it needs to
>> >be used only after testing that we actually are in a unibyte environment.
> I thought that's what all the tests with cent_sign and at_sign do,
> don't they?

No, they test for something more specific, namely, whether we're in a 
UTF-8 locale.  Not every multibyte locale uses UTF-8.

> what bad things could happen if this regular expression is
> used in a multibyte environment?
I suppose it could cause the script to print "Unprintable character in 
commit message" even though all the message's characters are actually 
printable.

How about this idea?  Before falling back to the unibyte regular 
expressions in awk, set LC_ALL='C' in the environment.  This should work 
well enough, as in practice all environments where the C locale is 
multibyte have working UTF-8 so they won't need to fall back to unibyte 
anyway.



  reply	other threads:[~2015-04-14 17:42 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
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 [this message]
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=552D519D.1000907@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --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).