From: Fujii Hironori <fujii.hironori@gmail.com>
To: cygwin@cygwin.com
Subject: BUG: Error messages of regtool are wrongly encoded
Date: Tue, 16 May 2017 10:52:00 -0000 [thread overview]
Message-ID: <CALus1PkHChR0nCaahAy4vp+i6RNm38Nv9CsM5yPNejyrS5yETQ@mail.gmail.com> (raw)
Error messages of regtool can't be read, which are encoded in
SHIFT_JIS in Japanese Windows.
$ regtool get /HKCU/hoge
Error (2): ▒w▒肳▒▒t▒@▒C▒▒▒▒▒▒▒▒▒▒܂▒▒▒B
$ regtool get /HKCU/hoge 2>&1 | iconv -f shift_jis
Error (2): 指定されたファイルが見つかりません。
--- regtool.cc.orig 2017-05-16 17:20:32.671229600 +0900
+++ regtool.cc 2017-05-16 17:21:18.859375500 +0900
@@ -197,13 +197,13 @@
void
Fail (unsigned int rv)
{
- char *buf;
+ wchar_t *buf;
if (!quiet)
{
- FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER
+ FormatMessageW (FORMAT_MESSAGE_ALLOCATE_BUFFER
| FORMAT_MESSAGE_FROM_SYSTEM,
- 0, rv, 0, (CHAR *) & buf, 0, 0);
- fprintf (stderr, "Error (%d): %s\n", rv, buf);
+ 0, rv, 0, (WCHAR *)& buf, 0, 0);
+ fprintf (stderr, "Error (%d): %ls\n", rv, buf);
LocalFree (buf);
}
exit (1);
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next reply other threads:[~2017-05-16 9:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-16 10:52 Fujii Hironori [this message]
2017-06-06 16:48 ` Corinna Vinschen
2017-06-20 11:19 ` Corinna Vinschen
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=CALus1PkHChR0nCaahAy4vp+i6RNm38Nv9CsM5yPNejyrS5yETQ@mail.gmail.com \
--to=fujii.hironori@gmail.com \
--cc=cygwin@cygwin.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 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).