File1 Content:
AddressBlock1|AddressBlock2
Main Rd. 1|Westpunt
EOL is Windows and encoding is UTF8
Java code snippet to read:
Scanner sc = new Scanner(new File(File1),"UTF-8");
while (sc.hasNextLine()) {
String line=sc.nextLine();
System.out.println(line);
}
Output:
?AddressBlock1|AddressBlock2
Main Rd. 1|Westpunt
Its appending ? in first line. What could be the reason?