delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/01/11/01:51:29

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:subject:references:to:from:reply-to:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=PMqnEwjrVoIWgWMe
Gurm7VK07sQkBCe7+4gzpenhjjo8A7ubqAKe40UAT1bTWQ6udwepTQeq/o5hG1uo
mwBfkFoZck2VcNJyfPKZh0e7NQ79A8uatNUJGrXr/tutyPKcL5JS/4ekIeAENyyG
v4eiCQ2CqQc3qA1q8sDMkdkd68c=
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:subject:references:to:from:reply-to:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=5e2cjm1hFpeMLVn+T3kWA8
R/YTc=; b=nkhKwuF2P1unrCNMi0ovQI8b7n0yCRTh0EFtMVW5EbGxG9oTYYGKUh
XTfJTWCooIadpRcMUg6FFAughPsOyLdfdwZx4hn/rLu1qpcutan18tvwct+lS2AL
K65N/7908AuiW8OWF1wjF/MLC0WOzXA/tB9YUXNQhY7CaYRifx6g0=
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=1.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=Hx-spam-relays-external:shaw.ca, H*r:shaw.ca, H*RU:shaw.ca, Calgary
X-HELO: smtp-out-no.shaw.ca
X-Authority-Analysis: v=2.2 cv=be0baKHB c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=8pif782wAAAA:8 a=w_pzkKWiAAAA:8 a=tpaqexOBaq4nuxIYThoA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=QEXdDO2ut3YA:10 a=bSC-MnHvYjsA:10 a=0rJpSBR2IEkCROgwrX0h:22 a=sRI3_1zDfAgwuvI8zelB:22
Subject: Re: [ANNOUNCEMENT] Updated: Cygwin 2.6.1-1
References: <58757597 DOT 8440ca0a DOT 2df89 DOT 9dc4 AT mx DOT google DOT com>
To: cygwin AT cygwin DOT com
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
Message-ID: <9b07d29e-1978-e726-90af-1822c11de9a4@SystematicSw.ab.ca>
Date: Tue, 10 Jan 2017 23:49:16 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0
MIME-Version: 1.0
In-Reply-To: <58757597.8440ca0a.2df89.9dc4@mx.google.com>
X-CMAE-Envelope: MS4wfEuc14core4dXy/mPxpdl0+HHrzGlR7QkFD7KZmxGhZXIp0F95qXZV5kyRjEZ+1kcyyTik1YUcmGEh3vZ0Z9jWzapjVAvDe191a46KD3HF9GKJ1BM95l F8DXwMrkH+yEfqKwzDRuVuuTHFY/5WgAnbnAkYSNwxfjqFfyuQtntCUH4VO95C+5MYutIP4ARVyHCA==
X-IsSubscribed: yes

On 2017-01-10 17:00, Steven Penny wrote:
> On Tue, 10 Jan 2017 13:08:30, Brian Inglis wrote:
>> Alt-numpad-decimal e.g. Alt234 depends on the console codepage
>> selected.
> 
> I tested this on Windows 7 in a pristine virtual machine, and cmd.exe
> passes just fine, even with code page 437 and crappy raster font.
> Meanwhile bash.exe fails.
> 
>> Mintty selection of Options/Text/Locale and Character set UTF-8 or
>> cmd chcp 65001 selects Unicode.
> 
> No one said anything about Mintty. This is about bash.exe, launched
> by itself or via Cygwin.bat

Both of which run under the cmd console - press Alt-space, select 
Properties, and on the Options tab it will show the Current code page, 
probably 437 in the US and 850 elsewhere in the English speaking world 
(and much of the Commonwealth with no local Language Packs), otherwise 
YMMV.

You can look up which characters are displayed using Alt-numpad-digits 
at https://en.wikipedia.org/wiki/Code_page_437 or in the selected code 
page using Alt-numpad-0-digits at Code_page_nnn or Windows_nnnn.

On top of that is added the Windows locale mapping to Cygwin locale and 
character set, plus readline settings used by bash in ~/.inputrc, which 
may change input interpretation.

Type locale to see what locale Cygwin thinks you are running.

Documentation available is at: 
	https://cygwin.com/cygwin-ug-net/setup-locale.html
which documents the default as C.UTF-8 (ASCII) unless LC_ALL, LC_CTYPE, 
or LANG env vars are set to change the locale and/or char set.
It does not really describe the impact or limits on effective input or 
output i.e. with the default are you limited to using ASCII characters, 
or only on input, or only affects tests, comparisons, and collating 
sequences, or free to use any UTF-8 characters?
It implies that the Cygwin char set will default to the equivalent of 
the Windows code page selected, and changing the char set in the 
locale env vars will change the char set/code page used.

You may have to chcp n in Cygwin.bat to get correct character output, 
either 437 for US, 850 for English, 65001 for UTF-8, others from 
above reference for other locales and char sets.

>> Alt-numpad-+-hex (on regular keys) allows hex unicode input e.g. 
>> Alt+3a9 if the font supports the character.
> 
> No one said anything about hex input.

It is an alternative input method for Unicode characters which does 
not seem to be supported with bash under cmd configured with default 
code pages, but is in mintty and elsewhere in Windows, which avoids 
having to pop up CharMap and search when you know the Unicode code 
point wanted.

>> Free text fonts which support Unicode character emojis are updated 
>> regularly. 
>> Look for Cygwin packages matching ...font... containing Truetype or 
>> Opentype fonts, and just copy them to Windows/Fonts e.g.
> 
> A font does not need to be installed. Raster, Consolas and Lucida all
> work already through cmd.exe.

Most Windows monospace fonts do not support most new Unicode characters, 
but fallback fonts can be configured in the registry to provide missing 
glyphs, given available fonts which support the glyphs, and code page 
65001/char set UTF-8 which supports the Unicode character set.
 
> I do appreciate your response, but all you have done here is thrown a
> bunch of guesses at the wall hoping something would stick. It would
> be a better use of everyones time if you actually tested your
> suggestions before posting them.

Mea culpa, having configured everything I can in Windows, Cygwin, and 
apps to support Unicode/UTF-8 character sets, with appropriate fonts 
and fallbacks, I forget the limitations and problems with OEM code 
pages which caused me to make that effort, indeed that people, apps, 
or systems still use those code pages implicitly.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

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