But i have problem with displaying the Arabic words in my android project, it's displaying like diamond Question marks "���", i've searched the whole internet to know what kind of problem is this, tried to convert from "ISO 8859-1", "WINDOWS-1256" and "WINDOWS-1252" to "UTF-8" but all failed, the "ISO 8859-1" displayed "question marks" (not inside a the black diamonds) and i assume that it's a Unicode problem (and i have no idea how to solve it), also the windows 1256 & 1252 displayed nothing (empty string) but it displays numbers if there was.
Here's some examples that i used in Java (Android):
I think that i need to know which charset does Mikrotik use to display arabic words, which i should convert from, to "UTF-8" because my android project charset is "UTF-8"
Code: Select all
String str = new String(originalStr.getBytes("ISO-8859-1"), "UTF-8"); // returns question marks but not inside the black square String str = new String(originalStr.getBytes("WINDOWS-1256"), "UTF-8"); // returns empty string String str = new String(originalStr.getBytes("WINDOWS-1252"), "UTF-8"); // also returns empty string
I'm truly confused and don't know what to do, so guys can you help with that?
NOTE : in PHP i used iconv and converted from "windows-1252" to "utf-8" and the arabic displayed correctly, but what about java (Android)?