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: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 AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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-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 Reply-To: cygwin AT cygwin DOT com Message-ID: <1556696146.20180904223649@yandex.ru> To: Thomas Wolff , cygwin AT cygwin DOT com Subject: Re: Cygwin fails to utilize Unicode replacement character In-Reply-To: <4a728822-3c4f-c99f-51cd-63822445aa18@towo.net> References: <5b8eccee DOT 1c69fb81 DOT 12eaa DOT 84a2 AT mx DOT google DOT com> <4a728822-3c4f-c99f-51cd-63822445aa18 AT towo DOT 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