Hi all,
I have a txt file in UTF8 format:
æ β ç ð ə ħ ŋ ø θ œ χ n d ŋ b a t d s t b a t d t d t d t ẽ u e ë l n e e m n l e β e e e ĕ e é ē è ȅ
I need to show it in Android, but some symbol show not correct.
How to show all symbol correct?
Thanks
Hi all,
I have a txt file in UTF8 format:
æ β ç ð ə ħ ŋ ø θ œ χ n d ŋ b a t d s t b a t d t d t d t ẽ u e ë l n e e m n l e β e e e ĕ e é ē è ȅ
I need to show it in Android, but some symbol show not correct.
How to show all symbol correct?
Thanks
It all boils down that you need to read, treat and display it as UTF-8 all the way. For the reading part, you can use InputStreamReader to read an arbitrary InputStream using a specific encoding.
reader = new InputStreamReader(new FileInputStream("/file.txt"), "UTF-8");
For the treatment part, the Java language should do it transparently without any problems since it perfectly understands Unicode. For the displaying part, that depends on how/where exactly you're displaying it. At least, it should be configured to use UTF-8 for that.