问题
I want to display Korean text in my TextView. It should display proper Korean language but instead it's displaying junk chars. Any one know how to fix this?
Thanks in advance.
回答1:
Android use a Unicode font, so it can display Korean character normally. You can try change your text encoding of your project because its not android problem.
回答2:
what you need is to load a korean font to the TextView, like Batang, BatangChe, Dotum..
This is similar question to yours: Display all Unicode chars in TextView
回答3:
You require a True Type font(ttf) file to support the language it seems. copy and paste the korean font file into your assets folder and try this code.
TextView text = (TextView) findViewById(R.id.textView1);
Typeface font=Typeface.createFromAsset(activity.getAssets(), "fonts/yourfontname.ttf");
holder.text.setTypeface(font);
holder.text.setText(your_variable);
来源:https://stackoverflow.com/questions/7632568/how-to-display-korean-text-on-textview