delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/10/02/02:58:42

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:message-id:to:subject:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
q=dns; s=default; b=L3QfSwaeFqsCzZgeVmdcSyjrPUK8DLXHzNG2Qm7qZYe
kYcui03FFAt8SxCal6IMoNMXa4JDo2uugGg6D830hq6evDl9mLUD6ck7AaLQFUlx
YkMPq25P7rZnQt5hDNGvcFWxURsryoIwvkUjX83WPvgWkwOmge60sN+/EldrMicE
=
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:message-id:to:subject:in-reply-to
:references:mime-version:content-type:content-transfer-encoding;
s=default; bh=bjBZfxlGbj0U7Eg6VclViXiInQA=; b=TxY/zA/wmOyI2V41f
FFjO85kw28l+gRfObG/+Z9nURjzOcj2kekCFpsgMQwX/YbtUZd5HnxtMv7LGrhOA
fa+Syco2QDxt8Gb1G6mW6QxXFlDU5H9J4x04gYKxWbZ1W3N3RZcXHC7L5CYmplfM
YJMDb2qNKPdd81F77ovHDsp5Qs=
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=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
Authentication-Results: marvin.c0d.org (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=vanav.org
Date: Sun, 2 Oct 2016 09:58:08 +0300
From: Ivan Vanyushkin <vanav AT vanav DOT org>
Message-ID: <1845982902.20161002095808@vanav.org>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin 2.6.0: unreadable UTF-8 in Windows console
In-Reply-To: <75a1vb1q48pqra6e9ksi3sricp66a59db9@4ax.com>
References: <123291584 DOT 20161001051347 AT vanav DOT org> <75a1vb1q48pqra6e9ksi3sricp66a59db9 AT 4ax DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019