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=lG8gpBl+ftg3JRNV
	VbzNsr5QGWAky6Q9RIXsMdPcELu6i+iE/b8uLNdop3vz6//ww7qOacoRSe+v+nQC
	6aScyLhw81olQwb2ZFYj5M2nw0dTlqOmpsV67dkAYkVLXInYxCX3JaFmOCL6hCBa
	CWBgmKB7E/cNrlB4ZqENdahqtLY=
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=mNHKSxFfXnvSTrog0QTzjd
	P5iDw=; b=fFeNkw/TaEzuA0hOVSOW5w5W1CABC16HJe5jQuvUnjzq+LIXQ1tbCg
	HrK0kisGMfI+ORCvC3e9Io/46/XwQCQNBx7SJPI4yPhtroyx1i+KLWN/ZNU+8eGZ
	4nWloGlP53ogvVunZ8lxeDSDwcUJsaJwTTAVHQiNlfwHMDkmv/mMg=
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=2.0 required=5.0 tests=BAYES_50,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=UD:ru, desktop, sk:www.joe, sk:wwwjoe
X-HELO: forward106p.mail.yandex.net
Authentication-Results: smtp2p.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Fri, 22 Jun 2018 14:17:28 +0300
From: Andrey Repin <anrdaemon@yandex.ru>
Reply-To: cygwin@cygwin.com
Message-ID: <59130091.20180622141728@yandex.ru>
To: Lee <ler762@gmail.com>, cygwin@cygwin.com
Subject: Re: UTF-8 character encoding
In-Reply-To: <CAD8GWsuo3PuQSdSyMRhbxZQXa=GUSBcyes7QEaqDYfh3FCof0Q@mail.gmail.com>
References: <CAD8GWss253v-p+FjeonEqibr53v6wZRCQ+NWxBhb0LimQaM4sQ@mail.gmail.com>   <1183751257.20180621042620@yandex.ru>  <CAD8GWsuo3PuQSdSyMRhbxZQXa=GUSBcyes7QEaqDYfh3FCof0Q@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Greetings, Lee!

> On 6/20/18, Andrey Repin wrote:
>> Greetings, Lee!
>>
>>> I'm looking at
>>>   https://cygwin.com/packaging-hint-files.html#pvr.hint
>>> and it starts off with
>>>   Use UTF-8 character encoding.
>>
>>> How do I do that and how do I check that I actually did use UTF-8
>>> character encoding _without_ using file?
>>
>> https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/

> I think I don't know enough to ask the right question.  A quick search
> yesterday on byte order markers turned up
>  
> https://msdn.microsoft.com/en-us/library/windows/desktop/dd374101(v=vs.85).aspx
> with this bit
>   Note   Microsoft uses UTF-16, little endian byte order.

Yes, default multibyte Windows encoding is UTF-16LE.
But in general, this is application specific.

> So... keep it simple, set
>   LANG=en_US.UTF-8
> and use vi or something else that comes with cygwin to create the file
> and I'll have a file with UTF-8 character encoding - correct?

I'm not familiar with vi, but this is true for other *NIX editors I know, they
use current locale settings by default, unless something else is specified in
their configuration or prompted by other cases (like byte order mark).

IMO, best chance is to use an editor that explicitly supports saving texts in
the desired encoding.
And please no BOM for UTF-8 files.


-- 
With best regards,
Andrey Repin
Friday, June 22, 2018 14:13:14

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

