I have a String like this
String str = "\u0e04\u0e38\u0e13\u0e23\u0e39\u0e49\u0e21\u0e31\u0e49\u0e22\u0e44\u0e14\u0e42\u0e19";
It actually looks like ช1: คุณรู้มั้ยไดโนเสาร์ตั
What I want is to keep the string as a string format so that str.charAt(3) is 'e' rather than a strange character.
How to do this? Help
Further explain: I get this string from a file. I read a line in the file to a string, and this line appears to be "\u0e04\u0e38\u0e13\u0e23\u0e39\u0e49\u0e21\u0e31\u0e49\u0e22\u0e44\u0e14\u0e42\u0e19". So in memory, this string is like this.
Code here:
FileReader fr = new FileReader("sample2.json");
BufferedReader br = new BufferedReader(fr);
String line;
while((line = br.readLine()) != null)
{
JSONObject data = new JSONObject(line);
String text = data.getString("text");
This line in the file is "\u0e04\u0e38\u0e13\u0e23\u0e39\u0e49\u0e21\u0e31\u0e49\u0e22\u0e44\u0e14\u0e42\u0e19"
Now I want to keep the string text as its original format.
charAt(3)as index starts with 0.