bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51638: 26.1; Writing Romanian Characters


From: Eli Zaretskii
Subject: bug#51638: 26.1; Writing Romanian Characters
Date: Sat, 06 Nov 2021 19:12:12 +0200

> 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," ?ţ)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]