Ignore:
Timestamp:
12/13/11 16:51:46 (13 years ago)
Author:
sherbold
Message:
  • now specifies character encoding of file explicitly instead of assuming default encoding
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaHelperLib/src/de/ugoe/cs/util/console/defaultcommands/CMDexec.java

    r244 r310  
    22 
    33import java.io.File; 
     4import java.io.FileInputStream; 
    45import java.io.FileNotFoundException; 
    56import java.io.FileReader; 
    67import java.io.IOException; 
     8import java.io.InputStreamReader; 
    79import java.security.InvalidParameterException; 
    810import java.util.List; 
     
    3840                        String[] commands; 
    3941                        File f = new File(script); 
    40                         FileReader reader = new FileReader(f); 
     42                        FileInputStream fis = new FileInputStream(f); 
     43                        InputStreamReader reader = new InputStreamReader(fis, "UTF-8"); 
    4144                        char[] buffer = new char[(int) f.length()]; 
    4245                        reader.read(buffer); 
Note: See TracChangeset for help on using the changeset viewer.