Description of problem:
Run im-chooser and then select ibus, add pinyin input method, then switch to Chinese pinyin mode and type word. The indicator window can correctly show the Chinese word, when I hit space to send these words, they appeared as [Invalid UTF-8].
Version-Release number of selected component (if applicable):
$ rpm -qa |grep ibus
Steps to Reproduce:
1. Switch to Chinese pinyin mode
2. Type Chinese words
3. Press space to send out the words
[Invalid UTF-8] appeared
Typed Chinese words appeared
Which application are you using to input Chinese characters?
I used mate-terminal. The problematic system is my office desktop, I just tried it on my home computer, there is no problem...Don't know why, any hint?
This is the list of ibus installation on my home computer:
[aaron@r61i ~]$ rpm -qa |grep ibus
But there are other packages needs updated on this system, while on the problematic office system, it is fully updated. I'll update my home computer with yum and then report back, thanks for the quick response!
My home computer is fully updated, still no problem. So looks like a per user configure issue?
Does a new account still have the problem?
Maybe it is a locale-related problem, tried to re-start your computer?
Please provides the output of the following command:
Maybe a screenshot will help to analyze it.
Created attachment 792023 [details]
Screenshot of locale command
A newly created account doesn't have this problem...
The [Invalid UTF-8] character is shown by sending a Chinese word to the terminal with ibus, I leave it there for the illustration. The ibus_test is the newly created user, looks like it has problem too in my account's environment.
I just tried:
1 delete .config .cache .local directories and then logout;
2 log in, used im-chooser to select ibus, then logout;
3 log in, problem still there.
A weird thing in step 2 is, when I select ibus and then plan to add pinyin mode, just found that pinyin was already there. It seems it remembered something that I didn't remove entirely. Hope this helps.
Good news, this time, in addition to the above mentioned directories, I also removed .icons .themes and ibus doesn't remember I've added pinyin before and Chinese words can be sent to the app now!
Any idea of why and what could possibly be the cause? But since it is resolved now, feel free to close it. But if you want to find out why and needs me to do anything, I would be glad to help. Thanks.
OK, this is crazy. After I played with some preference options of ibus-pinyin like changing width from half to full, etc. The problem is back...
Found a way to reproduce the bug:
1 remove all config files .config .cache .local .icons .themes and log out(or create a new user);
2 log in, use im-chooser to select ibus as the input method, then add pinyin, then log out;
3 log in, open terminal, Chinese input works; then select pinyin preference, change width from half to full, then test again, Chinese input still works; then right click ibus icon on the panel, select restart; then Chinese input will become [Invalid UTF-8].
Thanks for the information, I will have a try.
So it needs "ibus restart" to re-produce this problem?
(In reply to Peng Wu from comment #10)
> Thanks for the information, I will have a try.
> So it needs "ibus restart" to re-produce this problem?
Yes, both preference setting change and restart are required to reproduce the problem.
I cannot reproduce your problem.
Which do you mean some specific Chinese characters cause your problem or any Chinese characters do?
If some chars only, probably we need to know the type sequeces with pinyin.
Probably I think It failed in g_variant_new_string() and maybe g_utf8_validate() is failed internally.
It might be useful to provide a custom glib2 to output the failed string.
If you could debug /usr/libexec/ibus-engine-pinyin or ibus-daemon when you try to output Chinese and connect g_variant_valist_new_nnp(), it would be great.
(In reply to fujiwara from comment #12)
> I cannot reproduce your problem.
> Which do you mean some specific Chinese characters cause your problem or any
> Chinese characters do?
Any Chinese characters do.
> If some chars only, probably we need to know the type sequeces with pinyin.
> Probably I think It failed in g_variant_new_string() and maybe
> g_utf8_validate() is failed internally.
> It might be useful to provide a custom glib2 to output the failed string.
> If you could debug /usr/libexec/ibus-engine-pinyin or ibus-daemon when you
> try to output Chinese and connect g_variant_valist_new_nnp(), it would be
I'm not sure how I'm supposed to do this, any instructions? Thanks.
Sorry, I finally tried the mate-desktop on Fedora 19.
The ibus-pinyin have the problem, but ibus-libpinyin doesn't.
Please try ibus-libpinyin instead, ibus-pinyin is in maintenance mode now.
Great, libpinyin works well, thanks for the information.
It's just, for an innocent normal user, when he does:
$ sudo yum search ibus
ibus-pinyin.x86_64 : The Chinese Pinyin and Bopomofo engines for IBus input platform
ibus-libpinyin.x86_64 : Intelligent Pinyin engine based on libpinyin for IBus
The ibus-pinyin seems to have a better chance of being installed since the ibus-libpinyin feels more like a library to be used by ibus-pinyin. Oh I just checked Fedora release notes, the F18 release note mentioned this, so I missed something, sorry for that.
Thanks for the hint and I can finally input Chinese now!