Web lists-archives.com

Re: Cygwin fails to utilize Unicode replacement character




On Sat, 1 Sep 2018 15:50:04, Doug Henderson wrote:
This is an issue with rendering the character in the terminal window.
In both the CMD/Conhost/bash and Mintty/bash terminals, I have
configure the font to be Lucinda Console. This font does not have a
glyph for U+FFFD: Replacement Character. (To check your character set,
open Charmap, and check Advanced View. Type "Replacement Character" on
the Search field, and search.) In the absence of that glyph, the
terminal program must choose a glyph to display. In a later reply,
Thomas Wolff, the maintainer of Mintty, indicates that Mintty displays
the glyph for U+2592: Medium Shade (or a similar one). Without
reference to the source, it is difficult to be certain, but Conhost
appears to use a similar glyph.

In Mintty, if you choose a font, such as DejaVu Sans Mono, which
contains a glyph for U+FFFD: Replacement Character, you could expect
to see that glyph, however that is determined by the terminal. As I
write this, both Mintty (2.9.0) and Conhost (Windows 10 Home,
10.0.17134 Build 17134, fully patched) display a glyph with the
appearance of U+2592 Medium Shade.

Hm, this is a tough call. These fonts come with Windows:

- Consolas
- Lucida Console

Neither of them provide U+FFFD, so that means it will fall back to the
".notdef glyph":

http://docs.microsoft.com/typography/opentype/spec/recom

That presents 2 options:

U+FFFD:
 unicode conformant:
   yes
 consolas or lucida console:
   invalid byte or missing char: same glyph

U+2592:
 unicode conformant:
   no
 consolas or lucida console:
   invalid byte or missing char: different glyph
I would prefer the first option - as other fonts do define U+FFFD, including
"DejaVu Sans Mono" which Cygwin provides via the "dejavu-fonts" package. However
I can understand if we wanted to side with people using one of the default
fonts.


--
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