Re: [PATCH v2 0/9] icase match on non-ascii
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Jul 8, 2015, 11:32 UTC
- Message-ID
- <559D0A4F.9040307@web.de>
- In-Reply-To
- <1436351919-2520-1-git-send-email-pclouds@gmail.com>
On 2015-07-08 12.38, Nguyễn Thái Ngọc Duy wrote:
> Side note, I almost added the third has_non_ascii() function. Maybe we > should consider merging the two existing has_non_ascii() functions > back, or rename one to something else. >
Side question:
has_non_ascii can mean different things: UTF-8, ISO-8859-1, ISO-8859-x...
In short: everything. Should we be more critical here ?
May be this can be used from commit.c: static int verify_utf8(struct strbuf *buf)
Other question: Should the "non-ascii" characters in the test scripts be octal-escaped ?
Third question: What happens on systems, which don't have gettext, (for whatever reasons)
--- a/gettext.c +++ b/gettext.c @@ -166,12 +166,17 @@ void git_setup_gettext(void) textdomain("git"); } +int is_utf8_locale(void) +{ + return !strcmp(charset, "UTF-8"); +} 4th question: What happens on systems which don't have locale support at all ? As one may suspect, I'm not a friend of being dependent on gettext and/or locale, at least not for this kind of business. Would it make more sense to have a command line option ?