3232import org .slf4j .LoggerFactory ;
3333
3434import java .io .*;
35+ import java .nio .charset .StandardCharsets ;
3536import java .util .Scanner ;
3637
3738import static org .junit .Assert .*;
@@ -64,7 +65,7 @@ public void defaultLogging() throws Exception {
6465 File infoLog = new File (Config .getConfig (process .getProcess ()).getInfoLogPath (process .getProcess ()));
6566 File errorLog = new File (Config .getConfig (process .getProcess ()).getErrorLogPath (process .getProcess ()));
6667
67- try (Scanner scanner = new Scanner (infoLog )) {
68+ try (Scanner scanner = new Scanner (infoLog , StandardCharsets . UTF_8 )) {
6869 while (scanner .hasNextLine ()) {
6970 String line = scanner .nextLine ();
7071 if (line .contains (process .getProcess ().getProcessId ())) {
@@ -74,7 +75,7 @@ public void defaultLogging() throws Exception {
7475 }
7576 }
7677
77- try (Scanner errorScanner = new Scanner (errorLog )) {
78+ try (Scanner errorScanner = new Scanner (errorLog , StandardCharsets . UTF_8 )) {
7879 while (errorScanner .hasNextLine ()) {
7980 String line = errorScanner .nextLine ();
8081 if (line .contains (process .getProcess ().getProcessId ())) {
@@ -112,7 +113,7 @@ public void customLogging() throws Exception {
112113 File infoLog = new File (Config .getConfig (process .getProcess ()).getInfoLogPath (process .getProcess ()));
113114 File errorLog = new File (Config .getConfig (process .getProcess ()).getErrorLogPath (process .getProcess ()));
114115
115- try (Scanner scanner = new Scanner (infoLog )) {
116+ try (Scanner scanner = new Scanner (infoLog , StandardCharsets . UTF_8 )) {
116117 while (scanner .hasNextLine ()) {
117118 String line = scanner .nextLine ();
118119 if (line .contains (process .getProcess ().getProcessId ())) {
@@ -122,7 +123,7 @@ public void customLogging() throws Exception {
122123 }
123124 }
124125
125- try (Scanner errorScanner = new Scanner (errorLog )) {
126+ try (Scanner errorScanner = new Scanner (errorLog , StandardCharsets . UTF_8 )) {
126127 while (errorScanner .hasNextLine ()) {
127128 String line = errorScanner .nextLine ();
128129 if (line .contains (process .getProcess ().getProcessId ())) {
0 commit comments