I am facing an issue while reading a file with special characters. My .txt file has data:
I am reading this file using following code:
StringBuilder sBuilderString = new StringBuilder();
for (int n; (n = loInputStream.read()) != -1;) {
sBuilderString.append((char)n);
}
This string is now again used to write a file, the issue is that when i write the file, one of these two characters is replaced by some other special character.
How can i write code, which is able to read all the special characters and write that to another file?