I have a problem with language encoding... what i try is to incorporate a random motivational string into my app which contains German unicode letters... as far as I know, Java uses Unicode-16, but the respective letters dont show up at all when I start the app. I'm using Android Studio and the app is tested on a real device.
public class Start extends ActionBarActivity {
//This is a string array containing quotes
String[] motivational = {"Unser größter Ruhm ist nicht, niemals zu fallen, sondern jedes Mal wieder aufzustehen.\nRalph Waldo Emerson"};
public int randInt() {
Random rand = new Random();
return rand.nextInt((motivational.length) + 1);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_start);
//Takes a random quote from the list and sets it as a TextViews content
TextView motivator = (TextView) findViewById(R.id.motivator);
motivator.setText(motivational[randInt()]);
}
//rest of the class