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

  • From: Dang Hoai Phúc <danghoaiphuc@xxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx, Christian Egli <christian.egli@xxxxxx>
  • Date: Mon, 20 Apr 2020 14:06:18 +0700

Dear Christian,

I used the precompiled LibLouis.dll downloaded from Github. Do you think that it should be the issue so I need to recompile from its source code instead of using the prebuilt one?

Thanks,

Phúc

On 4/20/2020 1:51 PM, Christian Egli wrote:

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

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: