Q:

Euro currency symbol changes if saved and retrieved to/from internal storage

I have to save a text file taken from an EditTex to internal storage. Everything works fine but if I write the currency symbol of Euro € in the EditText and save it into internal storage, when I recover the file to put it in a TextView the symbol of Euro is transformed into this:  â¬ This doesn’t happen with the dollar symbol $. Here below the two methods used to save and retrieve the text file to/from internal storage. Please, any suggestion how to maintain the proper symbol of €?
private void store (String filename, String data)
{
    try
    {
        FileOutputStream fOut= openFileOutput(filename,MODE_PRIVATE);
        fOut.write(data.getBytes());
        fOut.close();

    } catch (FileNotFoundException e1) {
        e1.printStackTrace();
    } catch (IOException e1) {
        e1.printStackTrace();
    }

private String read(String namefile, String datxt)
{
    try{
        FileInputStream fin=openFileInput(namefile);
        int c;
        String temp="";
        while ((c=fin.read())!=-1)
        {
            temp=temp+Character.toString(((char)c));
        }
        datxt=temp;
    } catch (FileNotFoundException e1) {
        e1.printStackTrace();
    } catch (IOException e1) {
        e1.printStackTrace();
    }
    return datxt;
}

A:

I had the same problem and this is what I did. If this solution fixed your issue, please mark this answer as accepted. 
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public String UTF8 = "utf8";
public int BUFFER_SIZE = 8192;

private void store (String filename, String data)
{
    try {
        BufferedWriter fOut = new BufferedWriter(new OutputStreamWriter(openFileOutput(filename, MODE_PRIVATE), UTF8), BUFFER_SIZE);
        fOut.write(data);
        fOut.close();
    } catch (FileNotFoundException e1) {
        e1.printStackTrace();
    } catch (IOException e1) {
        e1.printStackTrace();
    }
}

private String read(String namefile, String datxt)
{
    try {
        BufferedReader fin = new BufferedReader(new InputStreamReader(openFileInput(namefile), UTF8), BUFFER_SIZE);
        int c;
        String temp = "";
        while ((c = fin.read()) != -1) {
            temp = temp + Character.toString((char) c);
        }
        datxt = temp;
        fin.close();
    } catch (FileNotFoundException e1) {
        e1.printStackTrace();
    } catch (IOException e1) {
        e1.printStackTrace();
    }
    return datxt;
}

