| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; q=dns; s= | |
| default; b=W1QGmTIrIV2biTZ0ebbP1Q+B4xGT4QJYgOkazW0xHN6YhhkXW4pbJ | |
| a2rTaAoIn8WxWtOvWp/xx5nc7t+7s4OlTM+Xi0twyzzSACvsDigx8lEehkGE07OK | |
| lKZFHRQtCEebqoxQECrKX8cgXXVSeJqy4QIXTPqwfaDc5tsLPMENzI= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; s=default; | |
| bh=HxrjpFxNJKJAm86cLn+Gpll+8NM=; b=e+aXlONdfaQz2FLjqGCSOiJsvbRL | |
| z6WLtrwQ5ZsBbar5G5MvynxceAMt5sThXhH5KoVd6IrY7wiCCCiNi82uYIHYZ0Su | |
| aJl2HXKUsV+EKT/Mcl8grdFfAWbfskJNMu4hskJj2R8zC5nteiXHOOcRDaLZIn3b | |
| RL4fqfvr672dwPo= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-107.3 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,GARBLED_BODY,GIT_PATCH_2,GIT_PATCH_3,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=japanese, Japanese, H*c:application |
| X-HELO: | drew.franken.de |
| Date: | Tue, 20 Jun 2017 13:19:22 +0200 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: BUG: Error messages of regtool are wrongly encoded |
| Message-ID: | <20170620111922.GE8342@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <CALus1PkHChR0nCaahAy4vp+i6RNm38Nv9CsM5yPNejyrS5yETQ AT mail DOT gmail DOT com> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <CALus1PkHChR0nCaahAy4vp+i6RNm38Nv9CsM5yPNejyrS5yETQ@mail.gmail.com> |
| User-Agent: | Mutt/1.8.0 (2017-02-23) |
--W5WqUoFLvi1M7tJE
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On May 16 18:15, Fujii Hironori wrote:
> Error messages of regtool can't be read, which are encoded in
> SHIFT_JIS in Japanese Windows.
>=20
> $ regtool get /HKCU/hoge
> Error (2): =E2=96=92w=E2=96=92=E8=82=B3=E2=96=92=E2=96=92t=E2=96=92@=E2=
=96=92C=E2=96=92=E2=96=92=E2=96=92=E2=96=92=E2=96=92=E2=96=92=E2=96=92=E2=
=96=92=E2=96=92=E2=96=92=DC=82=E2=96=92=E2=96=92=E2=96=92B
>=20
> $ regtool get /HKCU/hoge 2>&1 | iconv -f shift_jis
> Error (2): =E6=8C=87=E5=AE=9A=E3=81=95=E3=82=8C=E3=81=9F=E3=83=95=E3=82=
=A1=E3=82=A4=E3=83=AB=E3=81=8C=E8=A6=8B=E3=81=A4=E3=81=8B=E3=82=8A=E3=81=BE=
=E3=81=9B=E3=82=93=E3=80=82
>=20
>=20
> --- 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);
I applied this patch after fixing the formatting.
Thanks,
Corinna
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--W5WqUoFLvi1M7tJE
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJZSQS6AAoJEPU2Bp2uRE+gdj0P/RD2GXRcCJK2tzN8ay7yqxKx
bH8mgAHiwAFuYZRBBtlGSDW6IP2wCKB4QUmF9JE45RdGhehOtiWBC6U4YgHWQBct
N32FW6WZtKOZc4lR3tkA5i9gIj6uz+S8Ie3apwxoFmCIAWFG9YX9kDlEZK6uc7vR
P/OiVrftUzYGgWz8zeM0/dLr00h8hUb2OeXs/Hg4rjS4D1OeFKFh0odCef15GTdq
qnidxiKXzOV/vNfwm6F440lXoXcQGgJdw4gwTppsJgZ+VnPzfOA9LGOI6HgfYqDV
EwcF/jJHxbw/oLYb6JxOvJe7pA2mp8cY4CtpDY0tModMwU1qt7BHtaSswCTVZACV
bAfQ5qHJCMWpfourJsmYV0304USgdzsQvq6AByphOrd06ajLdsfWEVs0zetzTLeb
0jr9A3ulCrj11QyOqvHUAMQhdZG6RY0ppoL4TvLsKRM8fFErfr0W4Fr/6HhAgBSi
TZPQfLZr1zRy4Vm76r56orbUVU+w7N5aP4vSSmcaJyBgcJD7IqnBIxKpyc0Bf0qk
/WBoU+HWhpV7y/Q1H+I3t0SCOmV7AS6rHjx0AbFhZb+6shGdBtpnji/YanfdCpXe
t0xNvuke505IOgBbJnGrKvdDVmBmlocPKZR4++/7HzlN7rwlJsxGxU+GTtpyjjzZ
xKzHN6xslFuN6N1jZ2i6
=LW3Z
-----END PGP SIGNATURE-----
--W5WqUoFLvi1M7tJE--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |