From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63288 invoked by alias); 2 Oct 2016 06:58:25 -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 63266 invoked by uid 89); 2 Oct 2016 06:58:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.0 required=5.0 tests=AWL,BAYES_50,LIKELY_SPAM_SUBJECT,SPF_PASS autolearn=no version=3.3.2 spammy=65001, chcp, vanav.org, UD:vanav.org X-HELO: Marvin.c0d.org Received: from Marvin.c0d.org (HELO Marvin.c0d.org) (46.165.225.232) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 02 Oct 2016 06:58:13 +0000 Received: from marvin (Marvin.c0d.org [127.0.0.1]) by Marvin.c0d.org (Postfix) with ESMTP id 30975192CDC for ; Sun, 2 Oct 2016 09:58:11 +0300 (MSK) Authentication-Results: marvin.c0d.org (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=vanav.org Received: from Marvin.c0d.org ([127.0.0.1]) by marvin (marvin.c0d.org [127.0.0.1]) (amavisd-new, port 10026) with LMTP id oE9xbN7Gzg57 for ; Sun, 2 Oct 2016 09:58:11 +0300 (MSK) Received: from [127.0.0.1] (localhost [127.0.0.1]) by Marvin.c0d.org (Postfix) with ESMTPSA id A6C7C192CCE for ; Sun, 2 Oct 2016 09:58:10 +0300 (MSK) Date: Sun, 02 Oct 2016 09:34:00 -0000 From: Ivan Vanyushkin Message-ID: <1845982902.20161002095808@vanav.org> To: cygwin@cygwin.com Subject: Re: Cygwin 2.6.0: unreadable UTF-8 in Windows console In-Reply-To: <75a1vb1q48pqra6e9ksi3sricp66a59db9@4ax.com> References: <123291584.20161001051347@vanav.org> <75a1vb1q48pqra6e9ksi3sricp66a59db9@4ax.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00016.txt.bz2 I want to share binary built under Cygwin 2.6.0 with other user, that has no LANG set. In previous version all binaries worked correctly with UTF-8 input text. But now this doesn't work as expected. Some more simple tests. // Run Windows console. cmd C:\Cygwin_2.6.0\bin\echo ±5° ▒▒5▒▒ C:\Cygwin_2.6.0\bin\echo ±5°|C:\Cygwin_2.6.0\bin\grep . ▒▒5▒▒ // Bad in Cywgin 2.6.0. Maybe this is UTF-8? See below. // Now try in previous version. C:\Cygwin_2.5.2\bin\echo ±5° ±5° C:\Cygwin_2.5.2\bin\echo ±5°|C:\Cygwin_2.5.2\bin\grep . ±5° // Good in Cygwin 2.5.2. // Looks like changing console to UTF-8 codepage may fix the issue? chcp 65001 Active code page: 65001 C:\Cygwin_2.6.0\bin\echo ±5° ▒▒5▒▒ C:\Cygwin_2.6.0\bin\echo ±5°|C:\Cygwin_2.6.0\bin\grep . ▒▒5▒▒ echo ±5° ±5° echo ±5°|C:\Cygwin_2.6.0\bin\grep . ▒▒5▒▒ // Bad in Cygwin 2.6.0. Seems this is not UTF-8, just broken text. // Now try in previous version. C:\Cygwin_2.5.2\bin\echo ±5° ±5° C:\Cygwin_2.5.2\bin\echo ±5°|C:\Cygwin_2.5.2\bin\grep . ±5° echo ±5° ±5° echo ±5°|C:\Cygwin_2.5.2\bin\grep . ±5° // Works good in Cygwin 2.5.2 even with native "echo", because it produces UTF-8 now. Sunday, October 2, 2016, 9:29:11 AM, you wrote: > You don't have LANG set to "C.UTF-8". Do that. -- 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