From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#51638: 26.1; Writing Romanian Characters Date: Sat, 06 Nov 2021 19:12:12 +0200 Message-ID: <83zgqh9pjo.fsf@gnu.org> References: <82ab2ed1-86c3-e8e8-3f1f-7a9a1505729e@libero.it> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8467"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51638@debbugs.gnu.org To: crstml@libero.it Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 06 18:13:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mjPFl-0001yU-Bw for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 18:13:17 +0100 Original-Received: from localhost ([::1]:45568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjPFj-0005YX-Qa for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Nov 2021 13:13:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjPFW-0005Y7-Iy for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 13:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjPFW-0004V3-7j for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 13:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjPFW-00029X-3T for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 13:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Nov 2021 17:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51638 X-GNU-PR-Package: emacs Original-Received: via spool by 51638-submit@debbugs.gnu.org id=B51638.16362187558219 (code B ref 51638); Sat, 06 Nov 2021 17:13:02 +0000 Original-Received: (at 51638) by debbugs.gnu.org; 6 Nov 2021 17:12:35 +0000 Original-Received: from localhost ([127.0.0.1]:50354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjPF5-00028U-12 for submit@debbugs.gnu.org; Sat, 06 Nov 2021 13:12:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjPF3-00028E-0o for 51638@debbugs.gnu.org; Sat, 06 Nov 2021 13:12:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48636) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjPEx-0004Qs-GB; Sat, 06 Nov 2021 13:12:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=bWZ+zTM+NS5B3zyj505jJMv4tumP0ryAXKxvQk+L5+E=; b=XdbzO55FYDmzuRaHTWVF zSVEaUFeR78sye5jp1IyhJgSjthHGEjH+klHJl1W03NMyexYsDlqLt0jAxOQ3BTP+YLkhrBL6kX7/ iDGMqe9kFLFXiAMPLrkNwlhxZ2Bbur8PDbR4HEQkLYh9lb7drez8+7KXtFFi2dXR1ck9JEQ42QkVF 1UCV3P2C90NZ5/EToPfEYA2IzKtUwsnfygdBipqyqUyuvSKNGqrz+k8yTA2FKTUY/uzW7Yeb0fVsW KSL73QpsZgqI34CoPOUKwcWP5+a7rpXRVb2zCJnXfmUsHbL0kwYatRNu9/LuD4IdrKwusPISCfqhO qkqF/ZkcFHaGSQ==; Original-Received: from [87.69.77.57] (port=4841 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjPEw-0006X7-Uj; Sat, 06 Nov 2021 13:12:27 -0400 In-Reply-To: <82ab2ed1-86c3-e8e8-3f1f-7a9a1505729e@libero.it> (crstml@libero.it) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219121 Archived-At: > From: crstml@libero.it > Date: Sat, 6 Nov 2021 13:28:16 +0100 > > Sometimes I need to use Romanian characters. After I configure emacs to use > the Romanian language environment with set-language-environment I activate > an input method that allows me to write these characters with C-\. > > I works very well. I use the latin-2-postfix input method to write > language specific characters. But, there is problem: > > In the above mentioned input method if I write > >      s , > > I obtain the character > >      ş (UNICODE: U+015F; ISO-8859-2/iso-latin-2: 0xBA or 186; Entity: ş) > > which is very similar but NOT THE SAME with the Romanian character > >      ș (UNICODE: U+0219; ISO-8859-16/iso-latin-10: 0xBA or 186; Entity: ș) > > These are two distinct characters. Visually there is no problem reading a > Romanian text containing U+015F instead of U+0219 but there can be problem > when we perform character conversions or searches. > > For example if I write my Romanian text with U+015F instead of U+0219 and > save it in unicode all works well. But then if I want to convert that file > to ISO-8859-16, the convertor will tell me that the character U+015F cannot > be converted to the requested character set. > > By giving emacs the command "describe-language-environment" in the Romanian > environment I can see that  iso-latin-10 is listed as a Coding system appropriate > for this environment. > > My question is: Is it possible to configure emacs use iso-latin-10 instead > of iso-8859-2 in the Romanian enviroment? Please try the patch below. After applying the patch, typing "s ," will show two variants in the echo-area, and you can choose between them with C-f/C-b and the arrow keys. Is that a satisfactory solution? diff --git a/lisp/leim/quail/latin-post.el b/lisp/leim/quail/latin-post.el index 8329fff..78ae896 100644 --- a/lisp/leim/quail/latin-post.el +++ b/lisp/leim/quail/latin-post.el @@ -215,7 +215,15 @@ others | / | s/ -> ß Doubling the postfix separates the letter and postfix: e.g. a\\='\\=' -> a\\=' -" nil t nil nil nil nil nil nil nil nil t) +" + '(("\C-?" . quail-delete-last-char) + (">" . quail-next-translation) + ("\C-f" . quail-next-translation) + ([right] . quail-next-translation) + ("<" . quail-prev-translation) + ("\C-b" . quail-prev-translation) + ([left] . quail-prev-translation)) + t nil nil nil nil nil nil nil nil t) (quail-define-rules ("A'" ?Á) @@ -246,7 +254,7 @@ ("R'" ?Ŕ) ("R~" ?Ř) ("S'" ?Ś) - ("S," ?Ş) + ("S," "ŞȘ") ; the second variant is for Romanian ("S~" ?Š) ("T," ?Ţ) ("T~" ?Ť) @@ -286,7 +294,7 @@ ("r'" ?ŕ) ("r~" ?ř) ("s'" ?ś) - ("s," ?ş) + ("s," "şș") ; the second variant is for Romanian ("s/" ?ß) ("s~" ?š) ("t," ?ţ)