[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: commit-msg hook
From: |
Eli Zaretskii |
Subject: |
Re: commit-msg hook |
Date: |
Sat, 11 Apr 2015 12:55:50 +0300 |
> Date: Sat, 11 Apr 2015 10:24:05 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden
>
> However, the new hook hangs on Windows, in this line:
>
> print_at_sign='{print substr("'$cent_sign'@", 2)}'
>
> It hangs with both MSYS and native Gawk, including the native build of
> the latest Gawk 4.1.1c.
>
> 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 = "¢"
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.
- commit-msg hook, Eli Zaretskii, 2015/04/10
- Re: commit-msg hook, Johan Bockgård, 2015/04/10
- Re: commit-msg hook, Paul Eggert, 2015/04/10
- Re: commit-msg hook, Eli Zaretskii, 2015/04/11
- Re: commit-msg hook,
Eli Zaretskii <=
- Re: commit-msg hook, Eli Zaretskii, 2015/04/11
- Re: commit-msg hook, Dmitry Gutov, 2015/04/11
- Re: commit-msg hook, Eli Zaretskii, 2015/04/11
- Re: commit-msg hook, Dmitry Gutov, 2015/04/11
- Re: commit-msg hook, Eli Zaretskii, 2015/04/11
- Re: commit-msg hook, Stefan Monnier, 2015/04/11
- Re: commit-msg hook, chad, 2015/04/12
- Re: commit-msg hook, Paul Eggert, 2015/04/11
- Re: commit-msg hook, Eli Zaretskii, 2015/04/11
- Re: commit-msg hook, Paul Eggert, 2015/04/11