[liblouis-liblouisxml] Re: lou_translate: unicode output?

  • From: Simon Aittamaa <simon.aittamaa@xxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Fri, 16 Jan 2015 08:27:26 +0100

Hi,

Yeah, that what I figured from the code, but I've been wrong before...

The patch would need to be cleaned up a bit and it would _probably_ only
work on *nix, since it's using iconv. Not sure if that is a problem though,
since it's likely that we will need to use different libraries for *nix and
windows?

showString() feels  like a good candidate for unicodification, unless you
would rather see a new function for it, i.e. showStringUnicode(). Of
course, we could add a flag to showString(), but that would break the API,
so adding a new function might be preferable?

Best,
Simon

On 15 January 2015 at 15:52, Mesar Hameed <mesar.hameed@xxxxxxxxx> wrote:

> Hi,
>
> as far as I remember it is not possible at the moment, even if you
> use unicode.dis, it displays \x28xx.
> the current lou_translate does not assume or check that the terminal is
> utf-8 aware.
> On modern Linux/Unix systems this is safe to do, but I
> don't know if the same can be assumed with windows.
>
> If your patch works well on the various platforms we should role in your
> modifications across all the command line tools, lou_translate,
> lou_alround etc.
>
> What we often use is just lou_translate from python, where it is more
> straightforward.
>
>
> thanks,
> Mesar
> On Thu 15/01/15,15:41, Simon Aittamaa wrote:
> > Hi,
> >
> > Is there any way to output unicode from lou_translate? For example:
> >
> > $ echo "Α" | lou_translate -uf unicode.dis,en-ueb-g1.ctb
> > ⠰⠠⠨⠁
> >
> > I've currently patch lou_translate for this, but I was wondering if there
> > is a "standard" way of doing this?
> >
> > Best,
> > Simon
> For a description of the software, to download it and links to
> project pages go to http://www.abilitiessoft.com
>

Other related posts: