Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make the built-in sqlite3 support UTF8 encoding? #138

Closed
AlexZhouAA opened this issue Feb 14, 2016 · 4 comments
Closed

How to make the built-in sqlite3 support UTF8 encoding? #138

AlexZhouAA opened this issue Feb 14, 2016 · 4 comments

Comments

@AlexZhouAA
Copy link

This should be a significant issue since there're people who need store Chinese, Japanese or Korean information in sqlite db. Unfortunately, if they do so, they'll retrieve scrambled characters when query from database.

And I found #107 where @ktrzeciaknubisa says jx V8 works OK without this issue.
I followed the instructions at https://github.com/jxcore/jxcore/blob/master/doc/Android_Compile.md#compile-as-a-static-library and https://github.com/jxcore/jxcore-cordova#updating-jxcore-binaries-optional
The process was pretty smooth before I tried to recompile .so files.
I got error as below,

Android NDK: ERROR:/home/zhou/Downloads/jxcore-cordova/src/android/jni/Android.mk:mozjs: LOCAL_SRC_FILES points to a missing file    
Android NDK: Check that /home/zhou/Downloads/jxcore-cordova/src/android/jni/../jxcore-binaries/libmozjs_arm.a exists  or that its path is correct   
/home/zhou/Downloads/androidNDK/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting    .  Stop.

Then, I found #12. I can tell currently I can't replace JXcore binaries from sm to v8.

So now, what can I do to make the built-in sqlite3 support UTF8 encoding?
It's essential to my project. Is there any other way to deal this?

Thanks in advance.

@ktrzeciaknubisa
Copy link
Member

Then, I found #12. I can tell currently I can't replace JXcore binaries from sm to v8.

Indeed, currently only SM can be used with jxcore-cordova

So now, what can I do to make the built-in sqlite3 support UTF8 encoding?

Right now probably the best way for you would be e.g. to encode base64 data before putting into database an decode while reading.

@AlexZhouAA
Copy link
Author

Thanks, I'll try that.

@voxsoftware
Copy link

Este módulo que hice soluciona el problema. Simplemente se llama
require("sqlite-mobile-fix"); después de require("sqlite") y listo.
Saludos

2016-02-15 16:21 GMT-05:00 AlexZhouAA [email protected]:

Thanks, I'll try that.


Reply to this email directly or view it on GitHub
#138 (comment)
.

@jhernancanom
Copy link

Hello, friends.
I am interested in info about SQLite3 and UTF8.
Where can I find sqlite-mobile-fix for reading and understanding the solution?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants