I have a test.txt file with some Bengali character written as
???? ????, ????? ????
Now when I run this from some packege,
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
public class Test {
public static void main( String ajaira[] ) throws FileNotFoundException, IOException
{
File f = new File("test.txt") ;
InputStream is = new FileInputStream(f) ;
BufferedReader br = new BufferedReader( new InputStreamReader(is) );
System.out.println("Abs path: " + f.getAbsolutePath() ) ;
String s ;
while( (s = br.readLine()) !=null )
{
System.out.println(s) ;
}
}
}
I get some block... well I could not write it. This is the image Could anyone help with this thing...? Thank you.
See Question&Answers more detail:os