[liblouis-liblouisxml] Re: Using liblouis within an Android app.

  • From: Dave Mielke <dave@xxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Tue, 5 Jan 2016 12:51:14 -0500

[quoted lines by Michael Whapples on 2016/01/05 at 11:11 +0000]

I have read that Windows is using UTF-16LE and not UCS2 for its unicode so can
have surrogate pairs to represent any 32-bit unicode character which is not
valid for the fixed width UCS2.

Yes, that's correct. Windows does use UTF-16. Assuming little endian might be
incorrect. I'm just guessing, but I suspect that it's actually native endian.
In other words, weree Windows running on a big endian platform, I'm guessing
that its UTF-16 encoding would also be big endian.

Also, it may be worth noting, here, that Java, too, uses UTF-16 to encode the
characters within its String object.

In my opinion: Liblouis should be 32-bit based, and also offer a pair of
functions to convert to/from UTF-16.

Isn't there a standard C unicode data type? One thought is wchar_t,
but I read that is compiler specific so may lead to issues should
liblouis be compiled with one compiler and the application with
another.

No. On Windows, for example, wchar_t is only 16 bits.

--
Dave Mielke | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario | http://Mielke.cc/bible/
EMail: Dave@xxxxxxxxx | Canada K2A 1H7 | http://FamilyRadio.org/
For a description of the software, to download it and links to
project pages go to http://liblouis.org

Other related posts: