UTF-8 character encoding

Andrey Repin anrdaemon@yandex.ru
Fri Jun 22 17:30:00 GMT 2018

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

More information about the Cygwin mailing list