From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Max Mikhanosha Newsgroups: gmane.emacs.devel Subject: Re: Bugfix for utf-8 XTerm/MinTTY and (set-input-meta-mode t) Date: Tue, 01 Jun 2021 18:10:53 +0000 Message-ID: References: <83k0ndzfxr.fsf@gnu.org> <83h7ihze5y.fsf@gnu.org> <83czt5zd3r.fsf@gnu.org> Reply-To: Max Mikhanosha Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11679"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 01 20:29:44 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lo996-0002sg-Cj for ged-emacs-devel@m.gmane-mx.org; Tue, 01 Jun 2021 20:29:44 +0200 Original-Received: from localhost ([::1]:47576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo995-00066K-Fk for ged-emacs-devel@m.gmane-mx.org; Tue, 01 Jun 2021 14:29:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo8qy-0002tr-4d for emacs-devel@gnu.org; Tue, 01 Jun 2021 14:11:00 -0400 Original-Received: from mail1.protonmail.ch ([185.70.40.18]:21466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo8qv-0005wI-CF for emacs-devel@gnu.org; Tue, 01 Jun 2021 14:10:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1622571054; bh=R/aP3453lSMkuAYg/7b2JSu/HJZhKqtzC07UGUJOzY4=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=US/rgX+hVafUtigrGXAciD2fxBYIzTBc1JVSs/efLRcwEQF4OORrnsDdUjx/k48kx 2qY0yQrmmTsBqlM0UJ0M+4NYbG/TFNdWoSYLm3CHQgPh4Jf/K1BpPSNvtTED+j8ySA TNOgoF7My7qVzwN3KOhWko1A/TN5pExl7womqKMg= In-Reply-To: <83czt5zd3r.fsf@gnu.org> Received-SPF: pass client-ip=185.70.40.18; envelope-from=max.mikhanosha@protonmail.com; helo=mail1.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 01 Jun 2021 14:12:03 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270239 Archived-At: On Tuesday, June 1st, 2021 at 1:52 PM, Eli Zaretskii wrote: > OK, but then it cannot really be anything but an opt-in behavior. And > it cannot be hardcoded to depend on UTF-8 being the keyboard encoding, > because if a user sets the keyboard encoding to be UTF-8 (something > very popular these days), it doesn't mean the user gives up the > ability to type Latin characters in the 128 -- 255 range. I agree, and I don't really insist on my patch making it in, I understand t= hat you're reluctant to approve something thats in a hairy area of the code thats very= few people are touching. Reason I posted it, so that if other people having same probl= em as me can find the patch easily, if someone is configured their Emacs with 8-bit-= meta they likely to have no problems applying the patch and compiling their own. > Also, you show the results with input-meta-mode nil or t, but the > default value is neither nil nor t. What is the effect of the patch > when input-meta-mode is at its default value? With default neither nil nor t (ie anything else), it sets kepyboard->meta_= key to 2, which means 8-bit clean, and than neither before my patch nor after my patch 8th bit is never looked= at or stripped. META parameter to keyboard->meta_key mapping in C is: NIL =3D> 0 T =3D> 1 other =3D> 2 This can be trivially seen by grepping kepyboard.c for meta_key, all the if= statements referencing meta_key are either if (meta_key=3D=3D1), and than if (meta_key !=3D 2) for strippin= g the 8th bit. Thus with default value of meta_key=3D=3D2, there is no change to input dec= oding either before or after my patch