my problem is that if i use the String hardcode the answer is correct but if i use the inputed String not working . for example :
String variable = " \u0020\uFEB3\uFEE8\uFB93\u0020\uFEBB\uFE92\uFEEE\u0631\u0020";
TextView show = (TextView) findViewById(R.id.preshow);
show.settext(variable );
textview shows : صنگ صبور
but:
File filematn = new File(Environment.getExternalStorageDirectory()+File.separator+"SingingStudio/"+songname+"/"+songname+"file.txt");
//Read text from file
StringBuilder text = new StringBuilder();
try {
BufferedReader br = new BufferedReader(new FileReader(filematn));
String line;
while ((line = br.readLine()) != null) {
text.append(line);
text.append('\n');
}
br.close();
}
catch (IOException e) {
//You'll need to add proper error handling here
}
String variable = text.toString();
TextView show = (TextView) findViewById(R.id.preshow);
show.settext(variable );
textview shows : \u0020\uFEB3\uFEE8\uFB93\u0020\uFEBB\uFE92\uFEEE\u0631\u0020
how can i fix it . thank you