From: Eli Zaretskii <eliz@gnu.org>
To: Juanma Barranquero <lekktu@gmail.com>, Dani Moncayo <dmoncayo@gmail.com>
Cc: 12082@debbugs.gnu.org
Subject: bug#12082: 24.1.50; Wrong character showed by "C-h c"
Date: Mon, 30 Jul 2012 17:32:23 +0300 [thread overview]
Message-ID: <83obmxfhfs.fsf@gnu.org> (raw)
In-Reply-To: <CAAeL0SS+PoA8X_FY6DWO1bqEn9NJJNm23Dn=5mdXZxAcKmVmYQ@mail.gmail.com>
> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Mon, 30 Jul 2012 13:47:44 +0200
>
> On Mon, Jul 30, 2012 at 5:37 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Interesting. How did you two type M-ç? And what are your values of
> > keyboard and terminal coding-systems, and also what does
> > w32-get-console-codepage return?
>
> Ah, now I see a difference. Interesting, yes.
>
> I did the last check from a TCC console, not CMD, the difference being
> that in TCC I set the codepage to 1252, while CMD uses 850.
>
> So yes, starting emacs from CMD in window mode, C-h c M-ç indeed
> produces the ‡ message.
>
> I type M-ç with the left Alt key and the ç key of the Spanish keyboard.
>
> So, to summarize:
>
> - In CMD, with active codepage = 437
> - Window mode:
> keyboard-coding-system = windows-1252-unix
> (terminal-coding-system) = cp1252
> (w32-get-console-codepage) = 437
> Messages: "M-‡ is undefined"
>
> - Non-window mode:
> keyboard-coding-system = cp437-unix
> (terminal-coding-system) = cp437
> (w32-get-console-codepage) = 437
> Messages: "M-ç is undefined"
>
> - In CMD, with active codepage = 850
>
> - Window mode:
> keyboard-coding-system = windows-1252-unix
> (terminal-coding-system) = cp1252
> (w32-get-console-codepage) = 850
> Message: "M-‡ is undefined"
>
> - Non-window mode:
> keyboard-coding-system = cp850-unix
> (terminal-coding-system) = cp850
> (w32-get-console-codepage) = 850
> Message: "M-ç is undefined"
>
> - In CMD, with active codepage = 1252
>
> - Window mode:
> keyboard-coding-system = windows-1252-unix
> (terminal-coding-system) = cp1252
> (w32-get-console-codepage) = 1252
> Message: "M-ç is undefined"
>
> - Non-window mode:
> keyboard-coding-system = windows-1252-unix
> (terminal-coding-system) = cp1252
> (w32-get-console-codepage) = 1252
> Message: "M-ç is undefined"
Looks like Windows lies to us about the input codepage. Please apply
the patches below, run Emacs in GUI mode under GDB, and do the
following experiments:
. switch the keyboard to English ("EN" near the system tray), if you
can, and type a couple of pure ASCII characters
. switch the keyboard to Spanish and type ç and M-ç
. do the latter both with active codepage 850 and 1252
In each case, show the DebPrint messages shown by GDB as result of
typing each character.
Thanks.
=== modified file 'src/w32fns.c'
--- src/w32fns.c 2012-07-29 08:18:29 +0000
+++ src/w32fns.c 2012-07-30 14:06:20 +0000
@@ -2918,6 +2918,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARA
case WM_SYSCHAR:
case WM_CHAR:
+ DebPrint (("w32fns: WM_CHAR 0x%x\n", wParam));
post_character_message (hwnd, msg, wParam, lParam,
w32_get_key_modifiers (wParam, lParam));
break;
@@ -2939,6 +2940,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARA
{
W32Msg wmsg;
+ DebPrint (("w32fns: WM_UNICHAR 0x%x\n", wParam));
wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam);
signal_user_input ();
my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
=== modified file 'src/w32term.c'
--- src/w32term.c 2012-07-29 08:18:29 +0000
+++ src/w32term.c 2012-07-30 14:07:21 +0000
@@ -4295,6 +4295,7 @@ w32_read_socket (struct terminal *termin
if (msg.msg.message == WM_UNICHAR)
{
+ DebPrint (("w32term: WM_UNICHAR 0x%x\n", msg.msg.wParam));
inev.code = msg.msg.wParam;
}
else if (msg.msg.wParam < 256)
@@ -4336,6 +4337,9 @@ w32_read_socket (struct terminal *termin
break;
}
}
+
+ DebPrint (("w32term: 0x%x => 0x%x (cp%d)\n",
+ (char) msg.msg.wParam, code, keyboard_codepage));
inev.code = code;
}
else
next prev parent reply other threads:[~2012-07-30 14:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-29 17:50 bug#12082: 24.1.50; Wrong character showed by "C-h c" Dani Moncayo
2012-07-29 18:31 ` Eli Zaretskii
2012-07-29 21:44 ` Dani Moncayo
2012-07-29 23:04 ` Juanma Barranquero
2012-07-30 3:37 ` Eli Zaretskii
2012-07-30 9:17 ` Dani Moncayo
[not found] ` <CAAeL0SS+PoA8X_FY6DWO1bqEn9NJJNm23Dn=5mdXZxAcKmVmYQ@mail.gmail.com>
2012-07-30 14:32 ` Eli Zaretskii [this message]
2012-07-30 14:49 ` Juanma Barranquero
2012-07-30 14:53 ` Dani Moncayo
2012-07-30 14:56 ` Juanma Barranquero
2012-07-30 15:05 ` Dani Moncayo
2012-07-30 15:58 ` Eli Zaretskii
2012-07-30 16:16 ` Dani Moncayo
2012-07-30 16:43 ` Eli Zaretskii
2012-07-30 17:16 ` Eli Zaretskii
2012-07-30 17:47 ` Dani Moncayo
2012-07-30 18:11 ` Eli Zaretskii
[not found] ` <CAH8Pv0jk4Wv1WGFwtvmh0G76dTH6ae9kzPfmSb4Hgtyo4ry2GQ@mail.gmail.com>
2012-07-30 18:18 ` Dani Moncayo
2012-07-30 19:12 ` Eli Zaretskii
2012-07-30 14:22 ` Dani Moncayo
2012-07-30 14:32 ` Juanma Barranquero
2012-07-30 14:37 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83obmxfhfs.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=12082@debbugs.gnu.org \
--cc=dmoncayo@gmail.com \
--cc=lekktu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).