I'm making a program that accepts Arabic letters in EditText and those letters must be not linked together. And as far as I know, Arabic letters are linked together.
Example : Arabic letters like (كلب) should be like ( ك ل ب) of-course without spaces between letters
So how can I do to solve this issue or if there are any encodes must be with in XML file?
As Porges said, use "\u200C" between two linked letters to separate them without " "
You can try manually add spaces between each letter using a for-loop by doing something like this:
myEditText = (EditText)findViewById(R.id.edittext);
String temp = myEditText.getText().toString();
for(int i = 0; i < temp.length(); i++){
temp = temp.charAt(i) + " ";
}
myEditText.setText(temp);
look into this http://www.unicodemap.org/range/85/Arabic_Presentation_Forms-B/ Unicode Map, when the user enters any new character, handle it with replacing the equivalent from the Map
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With