storesafe / cordova-sqlite-evcore-extbuild-free

Cordova sqlite plugin with Android performance enhancements for PhoneGap Build, GPL v3 or commercial license options
Other
24 stars 13 forks source link

[UTF-8] Charset problems [multi-byte UTF-8 characters] #19

Closed netmist closed 6 years ago

netmist commented 7 years ago

I am facing the problem descrived here. In my device xperia Z5 is working ok but in the emulator (or any Intel processor device) I see the special chars retrieved from sqlite like this ?ffffffc3??ffffffb3? for ó, etc.

As brunocollaco suggests on the above linked thread I think this is a bug with evcore-extbuild-free plugin on intel processors.

Any ideas?

Thank you.

mmp-schmitt commented 7 years ago

I recently switched from cordova-sqlite-ext to cordova-sqlite-evcore-extbuild-free. I can confirm the same problem. This problem only occurs with Android, not with iOS.

netmist commented 7 years ago

Yes mmp-schmitt this problem occurs with Androids working on a Intel processor device and there are a lot of them. And also occurs with not-so-special chars ?ffffffe2??ffffff82? is what I got from the € symbol.

mmp-schmitt commented 7 years ago

The problem occurs with all UTF-8 characters beyond code 7F. When a character requires 2 bytes or more, the program fails. The Euro character has the URF-8 Hex code: e2 82 ac. Obviously there is a character misinterpretation between the x86 C library libsqlc-evcore-native-driver.so and the Java parts.

brodybits commented 6 years ago

Possible solution contributed in https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free/pull/2

Planning to publish a similar solution in November 2017.

brodybits commented 6 years ago

From https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free/pull/2#issuecomment-358453518:

I just saw the issue in case of 2-octet and 3-octet UTF-8 characters on Android x86_64 emulator, hoping to make this fix in the near future [...]

_P.S. I also see this on Intel x86 (32-bit) and x86_64 emulators._

brodybits commented 6 years ago

Some related issues:

I expect to fix this issue in the next major release (related to next major release of cordova-sqlite-storage discussed in litehelpers/Cordova-sqlite-storage#687).

brodybits commented 6 years ago

This issue is now resolved ref: https://github.com/litehelpers/Android-sqlite-evcore-native-driver-free/pull/2#issuecomment-380674108

21pg commented 4 years ago

Tamil Language (தமிழ்) text was not displaying properly in Android mobile app