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:mime-version:from:date:message-id:subject:to :content-type:content-transfer-encoding; q=dns; s=default; b=rZA wOwAteh9gURvYNwNi1/CoG7MTGT0cNlJxqKDNKysuFKuSoDKo/FDTVaJrPjA+ScC H9nXqY30cZkEve69KomvbP46ONxUM1TsU4Zj9TNq3nGxeN4UcBblwFWprQ/gbi87 SnFI7/o7XmuSXyYrhDqI5w+J+gBddMgz0rc2zJBc= 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:mime-version:from:date:message-id:subject:to :content-type:content-transfer-encoding; s=default; bh=6bssR2z6e zP4nEAWWbm4PTJjMD0=; b=sm2FauatluDwY6sdYew2dC419zixAHC5kWQNhbqNl cvzEraTBsL4Th8C/XzAY3Khq0XPkYr7OywIknoPQJ4KcJ3rcDlGWFiVIUslYTqXe EROwsTDnGHTkSQ0Uyp3rJw9wvOplP85gy7qQvSgBlr64hR/9v8MIMH5dA2MieBAD C4= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-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 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 From: Fujii Hironori Date: Tue, 16 May 2017 18:15:02 +0900 Message-ID: Subject: BUG: Error messages of regtool are wrongly encoded To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id v4G9G0UQ026782 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