From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75741 invoked by alias); 16 May 2017 09:15:05 -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 75028 invoked by uid 89); 16 May 2017 09:15:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,FREEMAIL_FROM,GARBLED_BODY,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f41.google.com Received: from mail-oi0-f41.google.com (HELO mail-oi0-f41.google.com) (209.85.218.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 May 2017 09:15:01 +0000 Received: by mail-oi0-f41.google.com with SMTP id l18so17570950oig.2 for ; Tue, 16 May 2017 02:15:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=rblotpyp2GpZgkx5avfnmbPdAqvBHYoZNHYwEE1vLhA=; b=NTS8Q6f8YUJy4bwrMVp4bqGBF94Oe9iuOVhxQGzt6fwbnjVXrh5EdTqvtS5tMWyiCD pXI0GAE53DUfxlodCali/ioC8vWS2CJu0nH14H6VDCxEKnVN0ii/4WJ1FSX0ELAeDqzT gaa95Vm/AFJ96B/6A/LnYyPKYUzIXuTPrJLf2BtREtegok4+GfhF5XqzBFy/1j+xE8zX vsLFGelCTFvYYWWwZoy8d6ARhwEcl9sXfUFKTQ1Ya3CSUvf+n6kL4V+86Jz+qxRZXtjh k0UogcCJUwFI46WOOlynV+vMVzbMgP2J/s7VoxoAu4dt9iOXf1kTZyzgIVPxCsa3Eyp8 5imw== X-Gm-Message-State: AODbwcCyrFGqsZfz4+jYY0O5uB4vz7jzG1W/xoFkx/orTdc/s8Dmj0Y8 7wMh4jgsC93P7UII9vr7Ku1hOfF9qPY+ X-Received: by 10.157.54.249 with SMTP id s54mr5427243otd.61.1494926103111; Tue, 16 May 2017 02:15:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.34.86 with HTTP; Tue, 16 May 2017 02:15:02 -0700 (PDT) From: Fujii Hironori Date: Tue, 16 May 2017 10:52:00 -0000 Message-ID: Subject: BUG: Error messages of regtool are wrongly encoded To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00246.txt.bz2 Error messages of regtool can't be read, which are encoded in SHIFT_JIS in Japanese Windows. $ 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 $ 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 --- 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