From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92399 invoked by alias); 5 Sep 2018 07:55:36 -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 92355 invoked by uid 89); 5 Sep 2018 07:55:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-101.2 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy==ef=bf=bd, courier?= X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (217.72.192.75) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Sep 2018 07:55:32 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MHaGK-1fu9oD1oke-003Nbi for ; Wed, 05 Sep 2018 09:55:29 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 7C4F9A820B6; Wed, 5 Sep 2018 09:55:28 +0200 (CEST) Date: Wed, 05 Sep 2018 07:55:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Cygwin fails to utilize Unicode replacement character Message-ID: <20180905075528.GA22010@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20180904090000.GD6350@calimero.vinschen.de> <5b8e6f22.1c69fb81.f383.1ac1@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="u3/rZRmxL6MmkK24" Content-Disposition: inline In-Reply-To: <5b8e6f22.1c69fb81.f383.1ac1@mx.google.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-09/txt/msg00086.txt.bz2 --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1340 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. >=20 > Cygwin provides it via the "dejavu-fonts" package, or you can get it here: >=20 > http://dejavu-fonts.github.io >=20 > > My W10 console only allows to specify a handful of fonts, Consolas, Cou= rier > > New, Lucida, MS Gothic, NSimSun, Raster Fonts, SimSun-ExtB. >=20 > You can add DejaVu or others like this: >=20 > 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 =EF=BF=BD So it looks like Deja Vu has a 0xfffd char. However, GetGlyphIndicesW claims otherwise: static const wchar_t replacement_char[3] =3D { 0xfffd, /* REPLACEMENT CHARACTER */ 0x25a1, /* WHITE SQUARE */ 0x2592 /* MEDIUM SHADE */ }; WORD gi[3] =3D { 0, 0, 0 }; [...] GetGlyphIndicesW (cdc, replacement_char, 3, gi, GGI_MARK_NONEXISTING_GLYP= HS); printf ("gi =3D %u %u %u\n", gi[0], gi[1], gi[2]); This prints: gi =3D 65535 401 372 That means, the notdef glyph for DejaVu looks like 0xfffd, but isn't, right? Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --u3/rZRmxL6MmkK24 Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAluPi/AACgkQ9TYGna5E T6CMDBAAmB9OYDfvUF7oJDOt29Vx9TK88X5Z9wRPI5JNU8E550JvFTdt/blRfv24 NTE4xopRqwEFpqpYZJ3B+hLiMz2IWeqwud3azqI6KuHyK1v5BTkHiokYGph5vfLc dGMHByDZ54i4S+dyKxan0/tHsaBWTe3GeaYAlaS0a2a7UTcaILTW7wjWC43eVEGn v1uO52yrE6pJzKidl8ZTsB4Lqkdz7y/sO+UN18w+xbEpmrA/btbsUFPjy29blSP5 uJAqCxZHpIDCRAY4l7QdivJzX7jIny3vjCdIgxh46OM0Y6/TmALOYBWWs7zwyXbc 1FtiALTH1PKAlDRp50AHUyStrWFBz6IeuXnw9+FT3ngRr5faYC68MmbMRqJU6qQ6 RaJiQ39LbphIj0f5Te/z7ScW0IJcFssGpHT0Qv/HNLow4JS9JBq/L4pWx8u6L2sV OrSUWAF4fTI3kuP6WKDBZ19AN50YdNLXibiBe05/8Yoen2IOVcmBPcO8xVR1MIbk pk3vgRZcJXj+64M/q2tLaN2vIz9bQdZJprjlBA+3Bga860WX29zljsVBJ0/nt2Cr wk7fGWLv7Uyb++XRlXtMqpKG/r+u38LvgJgAiEhYJOEIlkv9wH9eZPt2LGrpdtLP GtNu6+fovvJPehM7LgoPpJOhvwcnsBnEn4xMYrvIvENJqR5WL8o= =H5JX -----END PGP SIGNATURE----- --u3/rZRmxL6MmkK24--