From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121453 invoked by alias); 5 Sep 2018 09:22:04 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 121444 invoked by uid 89); 5 Sep 2018 09:22:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=concluded, courier, HContent-Transfer-Encoding:8bit X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.133) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Sep 2018 09:22:02 +0000 Received: from [192.168.178.45] ([95.91.209.148]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MKdiF-1fvZ8C2dAF-0022PJ for ; Wed, 05 Sep 2018 11:21:59 +0200 Subject: Re: Cygwin fails to utilize Unicode replacement character To: cygwin@cygwin.com References: <20180904090000.GD6350@calimero.vinschen.de> <5b8e6f22.1c69fb81.f383.1ac1@mx.google.com> <20180905075528.GA22010@calimero.vinschen.de> From: Thomas Wolff Message-ID: Date: Wed, 05 Sep 2018 09:22:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180905075528.GA22010@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00089.txt.bz2 Am 05.09.2018 um 09:55 schrieb Corinna Vinschen: > On Sep 4 04:40, Steven Penny wrote: >> On Tue, 4 Sep 2018 11:00:00, Corinna Vinschen wrote: >>> Whereever you get DejaVu Sans Mono from. >> Cygwin provides it via the "dejavu-fonts" package, or you can get it here: >> >> http://dejavu-fonts.github.io >> >>> My W10 console only allows to specify a handful of fonts, Consolas, Courier >>> New, Lucida, MS Gothic, NSimSun, Raster Fonts, SimSun-ExtB. >> You can add DejaVu or others like this: >> >> http://superuser.com/questions/390933/add-font-cmd-window-choices/956818 > I added DejaVu Sans Mono per the above and to my surprise I see this: > > $ cat alfa.txt > � > > So it looks like Deja Vu has a 0xfffd char. However, GetGlyphIndicesW > claims otherwise: > > static const wchar_t replacement_char[3] = > { > 0xfffd, /* REPLACEMENT CHARACTER */ > 0x25a1, /* WHITE SQUARE */ > 0x2592 /* MEDIUM SHADE */ > }; > WORD gi[3] = { 0, 0, 0 }; > [...] > GetGlyphIndicesW (cdc, replacement_char, 3, gi, GGI_MARK_NONEXISTING_GLYPHS); > printf ("gi = %u %u %u\n", gi[0], gi[1], gi[2]); > > This prints: > > gi = 65535 401 372 > > That means, the notdef glyph for DejaVu looks like 0xfffd, but isn't, right? I guess it means that (or something subtle related to font-fallback although we previously concluded the console wouldn't support it...). My vote remains for going back to MEDIUM SHADE, for 2.11.2 then..., unless we find a working detection function. Thomas -- 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