File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/org/openmainframeproject/cobolcheck/services/cobolLogic/replace Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11package org .openmainframeproject .cobolcheck .services .cobolLogic .replace ;
22
3+ import org .openmainframeproject .cobolcheck .services .filehelpers .EncodingIO ;
34import org .openmainframeproject .cobolcheck .services .log .Log ;
45import org .openmainframeproject .cobolcheck .services .log .LogLevel ;
56
@@ -162,9 +163,9 @@ public static String replaceInProgram(File program) {
162163 String newFileName = program +"_MOD" ;
163164 Log .warn ("Replace.replaceInProgram(): Writing the COBOL program file: " + newFileName );
164165 try {
165- BufferedWriter writer = new BufferedWriter ( new FileWriter (newFileName ) );
166+ BufferedWriter writer = ( BufferedWriter ) EncodingIO . getWriterWithCorrectEncoding (newFileName );
166167 // read the program one line at the time
167- BufferedReader reader = new BufferedReader ( new FileReader (program ));
168+ BufferedReader reader = ( BufferedReader ) EncodingIO . getReaderWithCorrectEncoding ( String . valueOf (program ));
168169 //for every line in the program, replace and write to output file
169170 String line ;
170171 int lineCount = 0 ;
You can’t perform that action at this time.
0 commit comments