[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Outputting NFC with ibus-m17n
From: |
Mike FABIAN |
Subject: |
Re: Outputting NFC with ibus-m17n |
Date: |
Thu, 20 Jun 2024 10:54:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Richard Wordingham <richard.wordingham@ntlworld.com> さんはかきました:
> I have a couple of problems using m17n with ibus on Ubuntu.
>
> ibus 1.5.26-4
> ibus-m17n 1.4.9-1
> m17n-db 1.8.0-3
>
> The core of the keyboard definition is a set of keystroke definitions
> such as
>
> (map
> (simple
> ;; cy3sn-p1:
> ("B" ?β) ; U+03b2 GREEK SMALL LETTER BETA
> ...
> ("e_H" ?é) ; U+00E9 LATIN SMALL LETTER E WITH ACUTE
> ))
> (state (init (simple)))
>
> These problems didn't occur when I was using fcitx as the input method.
>
> The first problem is that when the sequence of keystrokes is an initial
> portion of another sequence of keystrokes, the character I thought I had
> entered simply disappears after a while if I don't firm it up by moving
> to another character, e.g. by entering more strokes or moving the
> cursor.
Can you ɡive an example?
> The second problem is that the character I entered gets converted to
> NFD. Thus I can't enter e acute to grep for the line defining its
> keystrokes - I have to create my own regular expression engine to do
> searches respecting Unicode canonical equivalence.
>
> Am I missing some tricks to avoid these problems? The idea of the
> keyboard is that I can just type IPA by typing XSAMPA.
I am not sure whether I understand exactly what problems you are facing.
Long ago I wrote my own ipa-x-sampa.mim which I have in my home
directory:
$ ls ~/.m17n.d/ipa-x-sampa.mim ~/.m17n.d/icons/ipa-x-sampa.png
/home/mfabian/.m17n.d/icons/ipa-x-sampa.png
/home/mfabian/.m17n.d/ipa-x-sampa.mim
It seems to work for me.
It did not contain a line like
("e_H" ?é) ; U+00E9 LATIN SMALL LETTER E WITH ACUTE
it contained only:
("_H" ?́) ;; U+0301 COMBINING ACUTE ACCENT
Because of that, when I typed “e_H” I got é (U+0065 LATIN SMALL LETTER E
followed by U+0301 COMBINING ACUTE ACCENT)
But when I add this line:
("e_H" ?é) ;; LATIN SMALL LETTER E WITH ACUTE <- this line added today!
then typing “e_H” gives me é U+00E9 LATIN SMALL LETTER E WITH ACUTE.
But typing “a_H” still gives á (U+0061 LATIN SMALL LETTER A followed by
U+0301 COMBINING ACUTE ACCENT), because I did not add a ("a_H" ?á) line.
So by default, my ipa-x-sampa.mim produces NFD for é, that’s the way I
wrote it. But it could be changed to behave differently.
My ipa-x-sampa.mim is here:
https://github.com/mike-fabian/m17n-db-ipa-x-sampa
If you show me yours I can test it and see what goes wrong.
--
Mike FABIAN <mfabian@redhat.com>
睡眠不足はいい仕事の敵だ。