From: Germán Poo-C. <gp...@gn...> - 2014-11-20 18:24:58
|
On Thu, 2014-11-20 at 09:50 +0100, Zoltan Kota wrote: > Hi, > > I don't remember exactly for what python-bibtex uses 'recode'. But could we > not get rid of the recode package dependency somehow? 'Recode' is not > really maintained anymore. From a point of view of a packager, it is also > harder and harder to rebuild recode in newer distributions. I would aim to remove it. I had the perception that it was used to convert from/to LaTeX to latin-1. But in other parts of the code, encode/decode was also in use. FWIW, when I started porting pybliographer to Gtk+3, I got one encoding issue for showing the "native" window editor. When I started to track it down, finally I decide to start from bottom to top, and use Unicode everywhere. During that process, I took the chance to write a more generic (hopefully friendlier) API to parse LaTeX. On a side note, in the original design of Pybliographer, the core is the Iterator class, which I would aim to simplify it too (if that would make sense to do). So, the next steps would be: 1. Adapt pybliographer to the new python-bibtex API. 2. Decorate the classes that implement __str__ with python_2_unicode_compatible, and using the package six to help with some conversions. 3. Check every part that encodes or decodes strings. 4. Try to fix the config settings (the strings would be different: str != unicode in Python 2), that is, to read the old config settings and write them in a new format (all unicode) I think in (3) we can know for sure if we can remove or replace recode. -- Germán Poo-Caamaño http://calcifer.org/ |