java - Both Scanner and BufferedReader not reading the first line of file in unicode format -


i have tried reading file contents line line using bufferedreader. then, tried scanner also. problem is, if read file in unicode format, first line not read. please help. used tamil latha font.

my code:

with bufferedreader

file sourcefile=new file("d:/sample.txt"); fileinputstream f1=new fileinputstream(sourcefile); bufferedreader br1=new bufferedreader(new inputstreamreader(f1, "utf8")); linenumberreader  lnr = new linenumberreader(new filereader(sourcefile)); lnr.skip(long.max_value); int lines=lnr.getlinenumber();     lnr.close();     for(i=0;i<lines;i++)     {          system.out.println(s);     } br1.close(); 


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -