Fixed wrong encoding error
This commit is contained in:
parent
848d62a5f9
commit
504d5c62ef
|
@ -3,8 +3,7 @@ package ch.zhaw.pm2.racetrack;
|
||||||
import ch.zhaw.pm2.racetrack.given.ConfigSpecification;
|
import ch.zhaw.pm2.racetrack.given.ConfigSpecification;
|
||||||
import ch.zhaw.pm2.racetrack.given.TrackSpecification;
|
import ch.zhaw.pm2.racetrack.given.TrackSpecification;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.*;
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
@ -85,10 +84,9 @@ public class Track implements TrackSpecification {
|
||||||
* @throws FileNotFoundException if the FilePath is invalid.
|
* @throws FileNotFoundException if the FilePath is invalid.
|
||||||
*/
|
*/
|
||||||
private void readFile(File trackFile) throws FileNotFoundException {
|
private void readFile(File trackFile) throws FileNotFoundException {
|
||||||
Scanner scanner = new Scanner(trackFile);
|
Scanner scanner = new Scanner(new FileInputStream(trackFile),"UTF-8");
|
||||||
while (scanner.hasNextLine()) {
|
while (scanner.hasNextLine()) {
|
||||||
//track.add(scanner.nextLine());
|
track.add(scanner.nextLine());
|
||||||
System.out.println(scanner.nextLine());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue