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=qsX2aed31hj/khvU
	smqi5lDTP9UB8EKs7Xqk8puWSlfI6FHxC7dquJtAHgb0MEBX0VTEqVWd1uTM36jS
	Z6SG8BE4CNdLEGEQtkpY2j7XCIMrZm1b72tZJr/4VVaKijbaL5mPZ03t0qv4KEcX
	Ikzucc/QpLinkzLGRGgm2oI98uA=
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=Jd8JROCWjRr/cxAEiP/Ylp
	l1QEw=; b=ubhBEWI0MevW9K3meTBXv/zcmeUv9tNCxtG1oOWALgqhZlgyDV1aT0
	jrL+VjiOOJMfSx8xghs5O+1EOC69YMDJJxKt6TbhgjJt3FtamkgkhUeQhn9A+T7i
	AW2gSlrXE1+Xwn12RfYBZSpdGjVOvOFI3gtA5yyTUkMDXhOK/B6as=
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-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=andrey, Repin, repin, english
X-HELO: forward105o.mail.yandex.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1536090602;	bh=zWfk0WAwT6Fo8YseXtIWpqHJVM7Kv3x8Unt/96BR9lo=;	h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References;	b=kJ8otoCntylgg3TKykpFdO0Md0A4hv24+q/Q/DDSFD3acweezB7AO4VGkDUmGfgiM	 +kqdX2By/tbJedUuLYQrdBxGZCf2GTz2zYrL9bbc0SAe2hueIodhIt4XhWP8oeT8jK	 Fvti3GBd6jX2Yg+i2irMlGSanWewvERutVawYmKU=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1536090602;	bh=zWfk0WAwT6Fo8YseXtIWpqHJVM7Kv3x8Unt/96BR9lo=;	h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References;	b=kJ8otoCntylgg3TKykpFdO0Md0A4hv24+q/Q/DDSFD3acweezB7AO4VGkDUmGfgiM	 +kqdX2By/tbJedUuLYQrdBxGZCf2GTz2zYrL9bbc0SAe2hueIodhIt4XhWP8oeT8jK	 Fvti3GBd6jX2Yg+i2irMlGSanWewvERutVawYmKU=
Authentication-Results: smtp1p.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Tue, 4 Sep 2018 22:36:49 +0300
From: Andrey Repin <anrdaemon@yandex.ru>
Reply-To: cygwin@cygwin.com
Message-ID: <1556696146.20180904223649@yandex.ru>
To: Thomas Wolff <towo@towo.net>, cygwin@cygwin.com
Subject: Re: Cygwin fails to utilize Unicode replacement character
In-Reply-To: <4a728822-3c4f-c99f-51cd-63822445aa18@towo.net>
References: <e05669ed-c05b-684c-10b1-7af2a12657ae@towo.net>   <5b8eccee.1c69fb81.12eaa.84a2@mx.google.com>  <4a728822-3c4f-c99f-51cd-63822445aa18@towo.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id w84JoN2I015594

Greetings, Thomas Wolff!

>>> My vote is against the patch because the nodef glyph will often be
>>> just blank space which is certainly worse than ▒.
>>> If conhost does not provide a reasonable way to enquire 0xFFFD 
>>> availability it's conhost's fault, not cygwin's so why should cygwin 
>>> implement a bad compromise. If conhost ever improves, cygwin can adapt.
>>
>> This is some dangerous commentary. I would like to counter it now with 
>> some actual research.
> No idea what you consider dangerous. Anyway, we obviously agree that 
> hardly any available console font supports the REPLACEMENT CHARACTER.

If by "console" you mean "raster", then terminal simply unable to render
U+FFFD in raster font mode.

I.e.

$ php -r 'print "\u{FFFD}\n";' | cat -
cat: write error: Permission denied

This is regardless of selected codepage+locale.

> You had previously suggested code that might work (using CreateFont(0, 
> 0, ....)). Maybe you can sort out with Corinna how to get that work 
> inside cygwin. Otherwise, my opinion:
> - *working* fallback from FFFD to 2592: good

Neither that works.

$ php -r 'print "\u{2592}\n";' | cat -
cat: write error: Permission denied

> - revert to 2592: OK
> - fix FFFD: not good, because the .notdef glyph is not an appropriate 
> indication of illegal encoding (like broken UTF-8 bytes)

For both Consolas and Lucida Console, U+FFFD displays sensible presentation in
terminal.
May be less sensible for Lucida Console. But it is still immediately
recognizable for anybody who had seen unknown character glyphs before.
And if Microsoft gets better, it will be only better with no additional effort.

Whereas U+2592
1. unrecognizable.
2. may actually appear in legitimate output.


-- 
With best regards,
Andrey Repin
Tuesday, September 4, 2018 22:10:29

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


