I am trying to paste Hindi characters in an array with elements likeString[] arr = {"आपका स्वागत है","आपका स्वागत है"};
but its giving error i.e."some characters cannot be mapped using "Cp1252" character encoding"
while saving this.
Switch your text encoding to UTF-8.
In Eclipse go to Window -> Preferences, select General -> Workspace. From the Text file encoding dropdown, select UTF-8.
Thanks i found the solution...
textview.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/Hindi.ttf"));
its working fine...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