[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-ime-devel] Bug#873860: ibus-anthy FTBFS: UnicodeDecodeError: 'euc_jp' codec can't decode byte 0xe5 in position 46: illegal multibyte sequence



On Fri, 22 Sep 2017 23:20:39 +0900 Osamu Aoki <aoki.osamu at gmail.com> wrote:
> On Fri, Sep 22, 2017 at 09:14:22AM +0200, John Paul Adrian Glaubitz wrote:
> > This FTBFS can be easily fixed with:
> >
> > --- ibus-anthy-1.5.9.orig/data/zipcode-textdic.py
> > +++ ibus-anthy-1.5.9/data/zipcode-textdic.py
> > @@ -21,7 +21,7 @@ if len(sys.argv) < 2:
> >  anthy_zipfile = sys.argv[1]
> >
> >  try:
> > -    contents = codecs.open(anthy_zipfile, 'r', 'euc_jp').read()
> > +    contents = codecs.open(anthy_zipfile, 'r', 'utf-8').read()
> >  except UnicodeDecodeError as e:
> >      print('Your file is not eucJP? %s' % anthy_zipfile, file=sys.stderr)
> >      contents = open(anthy_zipfile).read()

I think it seems right way.

> Question is how to coordinate with other anthy users and the latest
> ibus.

I had to see the upstream code, and the script seems not there.
https://github.com/phuang/ibus-anthy/tree/master/data

I think we can choose the 2 ways:

1. just apply this patch
It seems not come from the upstream, so we don't need to take
care about it.

2. fix to work with both encoding zipfile
When the script get the exception, retry to open as utf-8, it may work
both version of anthy.



Reply to: