X-Recipient: archive-cygwin@delorie.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:reply-to:message-id:to:subject
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding; q=dns; s=default; b=Ta1lvvmKVYbPbDyD
	ZbU9NRh3Z5RJpzTrV/lkB4TZoUfCLGQs3i3Pr3qnfzjWinyN/ngoQ6pd/kviGXfv
	aslGu8rivOLK+dJJdSFDm2a0I2hnV3Y3K6h9SXgxoe/qsbr8ircrCS3/Ouv4eKyr
	BTJ5ymYW8G+Vg8h7pWqdfa6xbjw=
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:reply-to:message-id:to:subject
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding; s=default; bh=2Br93mi/yF3Qn3jNHZnToG
	EpdLs=; b=poGjXowmv1vhPpQVrnh6tGiHCCG41le6q60FLi7CF/uSfhm1LV3Gfo
	J9qHQqTzzhS6SFVyJFyYWylJgBS5dkNMES6FZb5/s99qwPOGB/Rqh40DYH0A+zZV
	FwdSC5Aj//h5vSfGQQejixwRIeeeS1reX4BC/HPgRa0S/YmX9ylx4=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_THEBAT,LIKELY_SPAM_SUBJECT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=Kenneth, kenneth, H*f:sk:BN6PR20, relevance
X-HELO: forward4j.cmail.yandex.net
Authentication-Results: smtp2m.mail.yandex.net; dkim=pass header.i=@yandex.ru
X-Yandex-Suid-Status: 1 0,1 0
Date: Thu, 25 May 2017 18:57:14 +0300
From: Andrey Repin <anrdaemon@yandex.ru>
Reply-To: cygwin@cygwin.com
Message-ID: <769693446.20170525185714@yandex.ru>
To: "Nellis, Kenneth" <Kenneth.Nellis@conduent.com>, cygwin@cygwin.com
Subject: Re: UTF-8 compatibility between Windows and Cygwin
In-Reply-To: <BN6PR2001MB1074BB00C47B3FD0DD0905F7F1FF0@BN6PR2001MB1074.namprd20.prod.outlook.com>
References: <BN6PR2001MB1074BB00C47B3FD0DD0905F7F1FF0@BN6PR2001MB1074.namprd20.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Greetings, Nellis, Kenneth!

> I have (BOM-less) UTF-8 text files that I can read fine in 
> Cygwin, but not Windows. When I create text files in Windows 
> containing non-ASCII characters, I cannot read them in 
> Cygwin. I understand why, but wondering the best way to be 
> able to share text files across the two environments. 

Please provide `od -t x1z` of the file you are referring to.

> I'm pretty sure that I want to keep my Cygwin LANG=C.UTF-8 
> setting,

Better use real language indication, and configure LC_ according to
preferences.

> but wondering what I can do on the Windows side for
> compatibility and what are the side effects.

On Windows side, you could actually use UTF-8.
Without seeing the requested dump, I can only guess, though.

> Currently
> Windows's Command Prompt command chcp shows "Active code 
> page: 437". (Is that obsolete or even relevant?)

Neither of the two, unless you consider relevance to the correct display of
the results and other console-related operations.
If you're often find yourself in a native console, I suggest you tweak LANG to
match (i.e. LANG=ru_RU.CP866 for me) and only change it to .UTF-8 for MinTTY
(it can help you with override, if you don't want to tweak your startup files).

> One solution seems to be to put a BOM in each UTF-8 text 
> file; then the files read fine in both environments, but 
> that's not conveniently accomplished.

That's hardly a solution, though. More like a workaround.


-- 
With best regards,
Andrey Repin
Thursday, May 25, 2017 18:48:43

Sorry for my terrible english...


--
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

