From: Thomas Rast <tr@thomasrast.ch>
To: "Trần Ngọc Quân" <vnwildman@gmail.com>
Cc: git-malling-list <git@vger.kernel.org>
Subject: Re: gettext CTYPE for libc
Date: Sun, 24 Nov 2013 10:05:53 +0100 [thread overview]
Message-ID: <874n72goem.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <52900FD6.5020202@gmail.com> ("Trần Ngọc Quân"'s message of "Sat, 23 Nov 2013 09:15:50 +0700")
Trần Ngọc Quân <vnwildman@gmail.com> writes:
> $ git status
> fatal: Unable to read current working directory: Kh?ng c? t?p tin ho?c
> th? m?c nh? v?y
>
> So, somthing wrong with our charset.
[...]
> $ gettext --domain=libc "No such file or directory"
> Không có tập tin hoặc thư mục như vậy
>
> in git's gettext.c, it not allow CTYPE="" for all domain, so we will set
> this one individually. In this ex. I set it for libc:
>
> $ git diff
> diff --git a/gettext.c b/gettext.c
> index 71e9545..abd3978 100644
> --- a/gettext.c
> +++ b/gettext.c
> @@ -115,6 +115,7 @@ static void init_gettext_charset(const char *domain)
> setlocale(LC_CTYPE, "");
> charset = locale_charset();
> bind_textdomain_codeset(domain, charset);
> + bind_textdomain_codeset("libc", charset);
> setlocale(LC_CTYPE, "C");
> }
Do you know why this "suddenly" broke? The long comment in
init_gettext_charset() suggests that the *existing* code is there to
handle exactly this problem, and apparently it doesn't. Why? Has libc
moved the perror() strings into a separate domain in some version?
--
Thomas Rast
tr@thomasrast.ch
next prev parent reply other threads:[~2013-11-24 9:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-23 2:15 gettext CTYPE for libc Trần Ngọc Quân
2013-11-24 9:05 ` Thomas Rast [this message]
2013-11-25 1:32 ` Trần Ngọc Quân
2013-11-25 7:20 ` Duy Nguyen
2013-11-25 19:31 ` Jonathan Nieder
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874n72goem.fsf@linux-k42r.v.cablecom.net \
--to=tr@thomasrast.ch \
--cc=git@vger.kernel.org \
--cc=vnwildman@gmail.com \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.