Subject: Re: bug#42099: Emacs -nw Turkish Layout Problem

From: Eli Zaretskii <[email-masked]>
Date: Sun, 28 Jun 2020 20:01:16 +0300

[Please keep the bug address on the CC line.]

> From: Yigit Emre Sahinoglu <[email-masked]>
> Date: Sun, 28 Jun 2020 18:21:17 +0300
> 
> w32-get-console-codepage,  w32-get-console-output-codepage  = 437 (#o665, #x1b5) (for GUI and "-Q
> -nw")

This is part of the problem, I think: codepage 437 doesn't support
Turkish characters.

> Command prompt fonts and encodings are fine for the system part. As I'm aware, encodings are fine
> (because GUI don't have this problem and the problem still exists with -Q) for the Emacs, too.

The GUI display is completely different from the -nw display in this
aspect, so the fact that GUI frames display correctly doesn't mean
anything regarding the text-mode display issues.

> I insert all Turkish char to the text file. After opening that file with "emacs -Q -nw" get this:
> 
> Original:                    ö Ö ç Ç      ş          Ş     i       İ         ğ         Ğ       ü Ü
> Emacs Response:     ö Ö ç Ç  \u015F \u015E  i  \u0130 \u011F \u011E   ü Ü 

This is clearly a display problem: Emacs uses the \u Unicode escapes
because it knows that codepage 437 cannot display those characters.

This is not the problem reported by the OP in Reddit.  There, the
problem seems to be one of _typing_ Turkish characters: he types a
character, but instead of inserting it Emacs invokes the 'undo'
command.  I think that problem is due to some strange interaction
between the non-default console emulator he uses and the Turkish
letters.