Does ionic storage stores data in UNICODE format?


#1

My application is a PWA as well as an Android app(APK). It uses IndexedDB in chrome, SQLite in Android devices and it might use other databases when IndexedDB is not present in the browser because I have used Ionic Storage.

The app is in English. Now I am trying to make it support 2 other languages(Spanish, Japanese) by the help of ngx-translate. When Spanish and Japanese users will give input data, I want it to be stored in UNICODE. Will it be already UNICODE or I have to write some code to achieve this?


#2

Bottom line: you don’t have to worry about it.

JavaScript itself stores characters as 16-bit entities, which is sufficient to hold most everything your users will input. When it isn’t, it hacks together two characters to look like one. If you are walking through strings and counting lengths at a low level, you might need to care about this, but for 99.9% of applications that are just storing and displaying text, you can be totally blissfully unaware of any of it.