libpinyin / ibus-libpinyin

GNU General Public License v3.0
625 stars 90 forks source link

[Help Request] Inteligent Pinyin iBus IME shows wrong characters #359

Open null-von-sushi opened 2 years ago

null-von-sushi commented 2 years ago

I have two machines, both with 'Intelligent Pinyin' installed. One is a Pop!_OS 20.04 machine, the other an Ubuntu 22.04 LTS machine. Both have been set to Traditional, however for some reason the Ubuntu machine shows characters like 爲 instead of 為 and 甚 instead of 什. I would like to know why this is? Is there a config file I have to change? What could be the reason for this?

epico commented 2 years ago

Could you provide more information or screenshots?

ping-wu commented 2 years ago

This topic has been discussed before; currently there appears to be no way to add vocabulary, such as "為" to the traditional User Dictionary for ibus-libpinyin. Epico has suggested using ibus-libzhuyin for inputting traditional Chinese characters.

null-von-sushi commented 2 years ago

Could you provide more information or screenshots?

I mean, these two are from the Ubuntu machine: first image, second image. This if from the Pop!_OS machine: image 1, image 2

This topic has been discussed before; currently there appears to be no way to add vocabulary, such as "為" to the traditional User Dictionary for ibus-libpinyin.

But it seems the software is capable of using a different character set, and does do so on one of my machines. I am not sure what the deciding factor could be, however. Hence why I am asking here. Is there some configuration file that determines this? Or was this simply removed from the newer versions (the Pop!_OS version is older than the one I have on my Ubuntu machine...)

Epico has suggested using ibus-libzhuyin for inputting traditional Chinese characters.

While ibus-zhuyin is nice, and has some nice features (filter by tone), it is also completely lacking others such as being able to type only the first sound of a sentence (i.e. JTTQHH) and have it autocomplete to the full sentence (今天天氣很好)

epico commented 2 years ago

Could you provide the screenshots of Ubuntu in Simplified Chinese and Traditional Chinese locale?

null-von-sushi commented 2 years ago

Do you mean with the whole OS set to either? sure. Traditional Simplified

Oh, and here are the about pages in case you wanted those too: Traditional Simplified

epico commented 2 years ago

I just checked the ibus-libpinyin source package in Ubuntu, it seems the package uses opencc when compiling.

Maybe you can try to disable opencc when compiling, and check if the result will change.

null-von-sushi commented 2 years ago

I think something must have changed since version 1.11.1-3 (from the Ubuntu Focal repository). The Pop!_OS version that my laptop is running is using packages from Ubuntu focal (it's an older release) so maybe they changed something since then?

Either way, I think you might be right and the reason is probably related to how they compile the package. Unfortunately I don't know how to recompile the latest without opencc on Ubuntu so I am unable to test this further, sorry

epico commented 2 years ago

I just checked the ibus-libpinyin package in Ubuntu Focal, it seems it is not compiled with opencc...

autay27 commented 1 year ago

I am also having this problem, also Ubuntu 22.04.2 LTS. I checked out the zhuyin package but can't see a way to switch to pinyin input on there.

null-von-sushi commented 1 year ago

Hi. Unfortunately I stopped using ibus-libpinyin, so I cannot help try to get to the bottom of this. If I remember correctly the zhuyin package installed a second IME that provided Pinyin? It's been a while so I don't remember, sorry.

Since this is a rather obscure issue (not many English speaking Linux users trying to get traditional Chinese using pinyin to work on the internet...), I will leave a workaround here to get traditional Chinese input (TW standard), using pinyin, however it will be for RIME.

(for context, I am still on Pop!_OS (22.04 LTS this time)).

Also, at first it seems like RIME has the same problem, however you can configure opencc in RIME to use s2tw (so, convert to Taiwanese standard) instead of s2t (convert to whatever other form of traditional is being used).

I found this out via the help of the nice people at opencc and RIME. Basically, you install ibus-rime, set your preffered "schema", and ensure that the schema you use has the correct "simplifier" section and the right "switches" enabled.

In really really simple terms:

You will now be using terra-pinyin, typing "wei" will show "為" instead of "爲". Only difference with normal pinyin is that you have the option (you don't have to do this) of also typing - \ / or < to indicate the tone. For example lan< will filter the suggestions to only show 3rd-tone characters with "lan" such as 懶.

Once again, sorry for not being able to fix the actual issue with ibus-libpinyin, but considering how little information there is out there in English, I wanted to leave this here.

Also note that there's probably better ways of doing this than to edit system files (/usr/share/rime-data is owned by the package not us...)

autay27 commented 1 year ago

Thank you, it worked on the first try and now everything is how I want it. Your instructions were very clear and now I even know about the tone filtering. 非常謝謝你!