How to write single Arabic letters?

I am making a program that accepts Arabic letters in EditText, and these letters should not be related to each other. And, as far as I know, Arabic letters are interconnected.

Example: Arabic type letters (كلب) should be like (ك ل ب) with no spaces between letters

So, how can I do this to solve this problem, or if there are any encodings in the XML file?

+4
source share
3 answers

You can try manually adding 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); 
+1
source

Like Porges , use "\ u200C" between two related letters to separate them without ""

+1
source

take a look at this http://www.unicodemap.org/range/85/Arabic_Presentation_Forms-B/ Unicode Map, when a user enters a new character, process it with replacing the equivalent from the map

0
source

Source: https://habr.com/ru/post/1391400/


All Articles