Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uim: disable non-utf-8 anthy backend #29981

Closed
wants to merge 1 commit into from
Closed

uim: disable non-utf-8 anthy backend #29981

wants to merge 1 commit into from

Conversation

Gorggg
Copy link
Contributor

@Gorggg Gorggg commented Apr 3, 2021

After the recent upgrade of anthy to 0.4 in 700c492, the anthy input method in uim will no longer work with the anthy available in the repository, instead requiring the anthy-utf8 input method to interface and convert kanji correctly. In order to prevent broken configurations, this change disables the build of the old anthy input method.

In order to avoid installing the new build of uim-anthy when the old anthy is present, I set uim-anthy to conflict with older versions of anthy that use EUC-JP instead of UTF-8. If there is a better way of ensuring this is not installed in a way that introduces incompatibility, I would very much like to know.

Thank you for reading this and for any reply.

General

Have the results of the proposed changes been tested?

  • I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
  • I generally don't use the affected packages but briefly tested this PR

@ericonr
Copy link
Member

ericonr commented Apr 3, 2021

This looks reasoanble to me, though I don't use any of the related software.

@sgn ?

@sgn
Copy link
Member

sgn commented Apr 4, 2021

Hm, I would count broken euc-JP supports as regression. But, I'm not sure if anyone still uses euc-JP, nowaday.
I guess you're one of them? Let me see if I could restore euc-JP support.

I don't think the conflict is necessary, libanthy dependency will conflict with anthy-9100* anyway.

@Gorggg
Copy link
Contributor Author

Gorggg commented Apr 4, 2021

@sgn

I'm sorry, I was unclear. It isn't the EUC-JP support that is broken. In fact, my change removes EUC-JP support. The problem is that the newer versions of anthy output UTF-8, whereas the anthy backend to uim takes EUC-JP, preventing the correct conversion of kanji. Instead, the anthy-utf8 backend must be used with newer versions of anthy. That is why this change disables the backend meant to interface with old (EUC-JP) anthy.

I can remove the conflict, thank you for pointing that out.

The version of anthy (0.4) that is now in the repository will not
work correctly with uim's conventional anthy input method, failing
to convert kanji. It will only with the anthy-utf-8 input method,
which accounts for the substitution of the EUC-JP encoding with
UTF-8 in newer anthy versions. In order to prevent broken
configurations, this change disables the build of the old anthy
input method.
@sgn
Copy link
Member

sgn commented Apr 5, 2021

@sgn

I'm sorry, I was unclear.

Sorry, It was me the one was unclear.

It isn't the EUC-JP support that is broken. In fact, my change removes EUC-JP support. The problem is that the newer versions of anthy output UTF-8, whereas the anthy backend to uim takes EUC-JP, preventing the correct conversion of kanji. Instead, the anthy-utf8 backend must be used with newer versions of anthy. That is why this change disables the backend meant to interface with old (EUC-JP) anthy.

I understood your arguments.
However, removing euc-jp looks like too arbitrary to me.
Debian had also removed euc-jp supports for a while then restore anthy because of bug #953616

Quoted from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=953616

  • If you have customized enabled-im-list on "stretch" system (in
    ~/.uim.d/customs/custom-global.scm) with uim-pref-gtk or other tools,
    uim sticks to use anthy instead of anthy-utf8 and fails kanji-conversion
    on upgraded "buster" system.

@Gorggg
Copy link
Contributor Author

Gorggg commented Apr 5, 2021

@sgn

Quoted from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=9536161

If you have customized enabled-im-list on "stretch" system (in
~/.uim.d/customs/custom-global.scm) with uim-pref-gtk or other tools,
uim sticks to use anthy instead of anthy-utf8 and fails kanji-conversion
on upgraded "buster" system.

This sounds like exactly the issue I had. I had added the conventional anthy backend (which used EUC-JP) to the custom im list. When I upgraded, kanji conversion failed because uim was still using the old backend even when anthy was upgraded to a UTF-8 version. That was what prompted me to submit this fix.

I guess this change is a bit selfish for my particular case, it was just very difficult to figure out why kanji input was suddenly no longer working and I wanted to spare other people that trouble. I was hoping that not working with the EUC-JP version of anthy would not be a problem, since an EUC-JP version is no longer in the repositories, but if otherwise I wouldn't want to break other setups.

Thank you for your time in addressing this.

@sgn
Copy link
Member

sgn commented Apr 6, 2021

I think we should ship a message/readme for this package? Would it be better?

@Gorggg
Copy link
Contributor Author

Gorggg commented Apr 6, 2021

@sgn

In that case, I would think the patch would properly be applied to the anthy package rather than this one, as it is the upgrade of anthy from version 9100h to 0.4 which would change the encoding, not any particular change in uim. I can try to create that if you would like.

@sgn
Copy link
Member

sgn commented Apr 7, 2021

Other Anthy based IME works fine, so I think it's irrelevant to them. uim would need a rev-bump soon for other reasons. I think it would make sense to put it in uim-anthy instead.

sgn added a commit to sgn/void-packages that referenced this pull request Apr 14, 2021
sgn added a commit to sgn/void-packages that referenced this pull request Apr 14, 2021
@sgn sgn mentioned this pull request Apr 14, 2021
3 tasks
sgn added a commit to sgn/void-packages that referenced this pull request Apr 15, 2021
@sgn sgn closed this in #30245 Apr 15, 2021
sgn added a commit that referenced this pull request Apr 15, 2021
Logarithmus pushed a commit to Logarithmus/void-packages that referenced this pull request May 5, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants