How to fetch hindi string from php file and set into android textview properly -
i have php file contains hindi string want fetch exact string in android, send encoded value
abc.php:
<?php echo "शुभ प्रभात"; ?>
in android:
@override protected void onpostexecute(string s) { toast.maketext(getactivity(), "message :+s, toast.length_long).show(); }
i tried
urldecoder.decode
and try
typeface typeface = typeface.createfromasset(context.getassets(), "hindi.ttf"); hometitle.settypeface(typeface);
for set textview nothing works me.
you need declare character set php file like
header('content-type: text/plain; charset=utf-8');
then after can try fetch json service give proper data. in case example
<?php header('content-type: text/plain; charset=utf-8'); echo "शुभ प्रभात"; ?>
Comments
Post a Comment