google / mozc

Mozc - a Japanese Input Method Editor designed for multi-platform
Other
2.44k stars 361 forks source link

Prolonged Sound Mark "ー" tobe "ろ" in kana input. #759

Closed reasonset closed 1 year ago

reasonset commented 1 year ago

Description

When using the Japanese keyboard and using Kana input, pressing the "|" key in the upper right corner should input a prolonged sound mark "ー", but "ろ" will be input.

Steps to reproduce Steps to reproduce the behavior:

  1. Use Japanese Keyboard
  2. Use Kana input
  3. put "|" key

Expected behavior Input "ー".

Actual behavior Input "ろ".

Version or commit-id Mozc-2.29.5111.102+24.11.oss

Environment

Investigations

Additional context

Only when press with shift key, "ー" is entered.

hiroyuki-komatsu commented 1 year ago

Hi reasonset,

I think this is a topic of Fcitx. So would you talk with the Fcitx project?

FYI. For Ibus, the prolonged key is mapped from '¥' (U+00A5).

https://github.com/google/mozc/blob/2030eb4a98b3ef30d2b618a2aa32bf2b17f463fd/src/unix/ibus/key_translator.cc#L252

So I guess the issue could be addressed by a similar approach.

reasonset commented 1 year ago

Maybe I just don't understand, but the problem appears to originate from Mozc. I think that for the following two reasons:

  1. If I prepare two Mozc packages (2.26.4632.102.g4d2e3bd and 2.29.5111.102.g7896c97) and install each of them, the problem does not occur when I install 2.26.4632.102.g4d2e3bd, but 2.29.5111.102.g7896c97, the problem occurs.
  2. The problem does not occur with libkkc, which uses the same Fcitx. (fcitx5-kkc)

I will give the details of 1. Manjaro provides fcitx5-mozc 2.26.4632.102.g4d2e3bd-2 as official package. It's currently unable to build. This package does not cause the problem. And the fcitx5-mozc 2.29.5111.102.g7896c97 package, which is made up to date by removing the commit ID in the source files has the problem.

The only difference between the two PKGBUILDs is the URL of the source file shown below.

source=(git+https://github.com/fcitx/mozc.git#commit=${_mozc_commit}
        https://osdn.net/projects/ponsfoot-aur/storage/mozc/jigyosyo-${_zipcode_rel}.zip
        https://osdn.net/projects/ponsfoot-aur/storage/mozc/x-ken-all-${_zipcode_rel}.zip
        git+https://chromium.googlesource.com/breakpad/breakpad#commit=${_breakpad_commit}
        git+https://github.com/google/googletest.git#commit=${_gtest_commit}
        git+https://chromium.googlesource.com/external/gyp#commit=${_gyp_commit}
        git+https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git#commit=${_japanese_usage_dictionary_commit}
        git+https://github.com/open-source-parsers/jsoncpp.git#commit=${_jsoncpp_commit}
        git+https://github.com/google/protobuf.git#commit=${_protobuf_commit}
        git+https://github.com/abseil/abseil-cpp.git#commit=${_abseil_cpp_commit}
        )

and

source=(git+https://github.com/fcitx/mozc.git
        https://osdn.net/projects/ponsfoot-aur/storage/mozc/jigyosyo-${_zipcode_rel}.zip
        https://osdn.net/projects/ponsfoot-aur/storage/mozc/x-ken-all-${_zipcode_rel}.zip
        git+https://chromium.googlesource.com/breakpad/breakpad
        git+https://github.com/google/googletest.git
        git+https://chromium.googlesource.com/external/gyp
        git+https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git
        git+https://github.com/open-source-parsers/jsoncpp.git
        git+https://github.com/google/protobuf.git
        git+https://github.com/abseil/abseil-cpp.git
        )

fcitx5-mozc 2.26.4632.102.g4d2e3bd-2 PKGBUILD defines commit IDs thus

## Mozc compile option
_bldtype=Release
_mozc_commit=4d2e3bd

## follow the submodule commits in https://github.com/fcitx/mozc/tree/fcitx/src/third_party
_abseil_cpp_commit=2151058
_breakpad_commit=216cea7
_gtest_commit=703bd9c
_gyp_commit=caa6002
_japanese_usage_dictionary_commit=e5b3425
_jsoncpp_commit=11086dd
_protobuf_commit=cc7b1b5

Again, the reproduction procedure does not include changes to Fcitx. Just installing other side of these two packages and restarting Fcitx will cause this to occur.

yukawa commented 1 year ago

Again, the reproduction procedure does not include changes to Fcitx

That's incorrect, or you misunderstood where fcitx-mozc is developed. See here

source=(git+https://github.com/fcitx/mozc.git

You are fetching source code from github.com/fcitx/mozc.git, which belongs to fcitx github organization. Following two git repositories are not exactly the same.

Regarding the symptom you are talking about, I suspect that aa69eaeda2f5b627c42d6dbd3c72130d8e22b7dd in their repository may have something to do with your case. Mind checking if the issue started happening from aa69eaeda2f5b627c42d6dbd3c72130d8e22b7dd or not? If yes, I'd suggest letting the author know about it at https://github.com/fcitx/mozc/issues.

reasonset commented 1 year ago

OMG, I completely overlooked the fact that it's a fork. I'm sorry!

I have tried building with different commits and it seems that eae95aa is indeed causing the problem. I will report issue to Fcitx's Mozc repo.

Thanks for your great help. Thank you and I'm so sorry.