readium-sdk icon indicating copy to clipboard operation
readium-sdk copied to clipboard

Android - UTF-8 vs modified UTF-8 vs UTF-16

Open mark-buer opened this issue 10 years ago • 1 comments

I understand that the Android JNI bindings are still WIP, but this seems an important issue to raise so it can be addressed before a stable Android release.

On the JNI API, the *UTFString* API functions speak a funny dialect of UTF-8 called "Modified UTF-8".

Do the Android Readium bindings wrongly assume that the *UTFString* functions speak proper UTF-8?

The following hints at a potential problem:

  • there is no mention of the phrase modified UTF8 anywhere within the JNI project
  • there are mentions of UTF8 in close proximity to *StringUTF* invocations (readium-sdk/Platform/Android/jni/helpers.h)

Most JNI projects I've seen use the UTF-16 variants of the JNI API. These are the *String* API functions (sans UTF).

mark-buer avatar May 18 '15 06:05 mark-buer

@mark-buer : Unfortunately, the developers who created the JNI bindings have moved on to other projects and are no longer around to answer these questions. I think you clearly have more knowledge of this area than I. I will put this on the agenda for our Wednesday meeting at 1600h UTC. You are more than welcome to attend. Feel free to contact me directly at [email protected]. Thanks

rkwright avatar May 18 '15 15:05 rkwright