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:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=R3Hw6RafcJjmrJKH4YcQOhTiGypvORr1KR2clzK4GE1iIQUCQ6mAf 0jkjTdgD5UhVyNwdUmwF2funKET+8aIYyG4vj9lm/ziEASwhxiON736poq90duMZ LUakR/NcN2M9cp6g2eBrBdNf4WVcfTEWsBUok2JjLiHcrmrfSxB3gE= 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:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=YfM1O8psz+EkOxug34NAQFet25w=; b=xslV1jou20KD1ZmJXTYp7rHahaki JLQlDonuzgdVdiPd3RwoI1+zDaWhUpx5/GHqwsjT0KDq+nnvCVdMTv8KX6s1fY9i hus/UlX69udNTHDl0BN3Vjxcv4w42Qk3+P4fVuY+shLeUgys7nmVpEm5TKxJjf/3 54/ALFf0Xv7F10Y= 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: =?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 Date: Wed, 5 Sep 2018 09:55:28 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Cygwin fails to utilize Unicode replacement character Message-ID: <20180905075528.GA22010@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20180904090000 DOT GD6350 AT calimero DOT vinschen DOT de> <5b8e6f22 DOT 1c69fb81 DOT f383 DOT 1ac1 AT mx DOT google DOT 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) --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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" -----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--