Web lists-archives.com

Re: Cygwin fails to utilize Unicode replacement character

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:


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:

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.

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