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

  • From: Harri Pasanen <harri@xxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Thu, 15 Jan 2015 16:43:27 +0100


Provided you are on linux, your terminal is utf-8 friendly and your standard python is python 2, you can do one long command line:

echo abc | lou_translate -f unicode.dis,en-ueb-g1.ctb | python -c 'import sys;s=sys.stdin.read();print "".join([unichr(int("0"+s[k+1:k+6],16)) for k in range(0,len(s),6)])' -

I believe on most current linux boxes the above should work out of the box.

Regards,

Harri

On 15/01/2015 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: