[liblouis-liblouisxml] Re: Issue with Calling LibLouis Translate in Latest Version

  • From: Christian Egli <christian.egli@xxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 20 Apr 2020 08:51:28 +0200

Hi Dang

Comments below

Dang Hoai Phúc writes:

May I have your support for this issue. I have no problem to translate
with LibLouis 3.6 but with output issues with latest version like 3.12
or 3.13. This occurs with all other tables, not only the en-us-g1.ctb.
My code is written in Delphi. Please help to examine the code below
and look forward to your support.

lou_translateString(PAnsiChar(table), PAnsiChar(inStr), inlen,
PAnsiChar(outStr), outlen, nil, nil, mode);

ShowMessage(outStr);

end;

Above code outputs successfully with 'hello world" with 3.6 version.

but with LibLouis 3.12, it has issue. The output is: outStr =
''''#0'\'#0'z'#0'0'#0'0'#0'6'#0'5'#0'0'#0'0'#0'6'#0'8'#0''''#0''''#0'\'#0'z'#0'0'#0'0'#0'6'#0'c'#0'0'#0'0'#0'6'#0'c'#0''''#0''''#0'\'#0'z'#0'0'#0'0'#0'2'#0'0'#0'0'#0'0'#0'6'#0'f'#0''''#0''''#0'\'#0'z'#0'0'#0'0'#0'6'#0'f'#0'0'#0'0'#0'7'#0'7'#0''''#0''''#0'\'#0'z'#0'0'#0'0'#0'6'#0'c'#0'0'#0'0'#0'7'#0'2'#0''''#0''''#0'\'#0'y'#0'd'#0'0'#0'0'#0'6'#0'4'#0''''

If I save the outStr into file with unicode format, it will have the
result like this:

'\z00650068''\z006c006c''\z0020006f''\z006f0077''\z006c0072''\yd0064'

With this output, it is actually the 'hello world' in character
hexacodes but it doesn't output as with LibLouis 3.6.

Hard to say what the problem is. Are both versions compiled with ucs4?

HTH
Christian

-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland

For a description of the software, to download it and links to
project pages go to http://liblouis.org
Donate: http://liblouis.org/sponsoring

Other related posts: