I have a string which contain some German language characters and Im setting in Textview but some characters are not showing but a box instead of them . here is code:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_german);
TextView abc = (TextView) findViewById(R.id.abc);
String chararc = getString(R.string.german);
try {
final String s = new String(chararc.getBytes(), "UTF-8");
abc.setText(s);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_german, menu);
return true;
}
}
here is string :
<string name="german">Ë ø ë Ḧ ḧ Ï ï Ḯ ḯ M̈ m̈ N̈ n̈ Ö ö Ȫ ȫ Ṏ ṏ P̈ p̈ S̈ s̈ T̈ ẗÜ ü Ǖ ǖ Ǘ ǘ Ǚ ǚ Ǜ ǜ Ṳ ṳ Ṻ ṻ V̈ v̈ Ẅ ẅ Ẍ ẍ Ÿ ÿ
</string>