From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18678 invoked by alias); 20 Jun 2017 11:19:33 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 17776 invoked by uid 89); 20 Jun 2017 11:19:32 -0000 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 Received: from mail-n.franken.de (HELO drew.franken.de) (193.175.24.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Jun 2017 11:19:30 +0000 Received: from aqua.hirmke.de (aquarius.franken.de [193.175.24.89]) (Authenticated sender: aquarius) by mail-n.franken.de (Postfix) with ESMTPSA id 12AD1721E282F for ; Tue, 20 Jun 2017 13:19:23 +0200 (CEST) Received: from calimero.vinschen.de (calimero.vinschen.de [192.168.129.6]) by aqua.hirmke.de (Postfix) with ESMTP id 757CF5E0419 for ; Tue, 20 Jun 2017 13:19:22 +0200 (CEST) Received: by calimero.vinschen.de (Postfix, from userid 500) id 5A55EA80648; Tue, 20 Jun 2017 13:19:22 +0200 (CEST) Date: Tue, 20 Jun 2017 11:19:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: BUG: Error messages of regtool are wrongly encoded Message-ID: <20170620111922.GE8342@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="W5WqUoFLvi1M7tJE" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017-06/txt/msg00239.txt.bz2 --W5WqUoFLvi1M7tJE Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1472 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" Content-length: 819 -----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--