I'm developing an app with Arabic text in it.. My phone supports Arabic so the text gets displayed correctly.. the weird problem is that: if I copy an Arabic text that i want from a.txt file and put it into an EditText, the EditText displays weird characters, but if I write the SAME text manually (not copy-paste), the text gets displayed normally!!
Here is a picture showing what I mean, the first EditText is the text I wrote manually, and the second is the text I copy-pasted from the .txt file..
Here is the code of the app:
xml file:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical">
<EditText android:text="EditText" android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content"></EditText>
<EditText android:text="EditText" android:id="@+id/editText2" android:layout_width="wrap_content" android:layout_height="wrap_content"></EditText>
</LinearLayout>
I hope you get what I mean, since it wasnt easy to explain this weird (stupid) problem. Thanks.