Possible Duplicate:
Read special symbols from file
I am trying to copy a file to another file . The file is using encoding standard UTF8 and file also containing special characters . the program is not able to copy the special characters in another file in the same format the file is being disturbed with box shapes for special symbols.
try
{
BufferedReader br= new BufferedReader(new InputStreamReader(new FileInputStream(new File("path of the file")),"UTF8") ;
BufferedWriter bw= new BufferedWriter(new OutputStreamReader(new FileOutputStream(new File("path of the output file");
while(br.readLine()!=null)
{
//code here to read and write from a file to another.
}
}
catch(Exception ex
{
ex.printStackTrace();
}