Ignore:
Timestamp:
05/18/11 14:12:04 (14 years ago)
Author:
sherbold
Message:
  • build workaround for a bug of the SAX parser with BOM byte handling to fix further encoding problems
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/LogParser.java

    r4 r45  
    22 
    33import java.io.File; 
     4import java.io.FileInputStream; 
    45import java.io.FileNotFoundException; 
    5 import java.io.FileReader; 
    66import java.io.IOException; 
     7import java.io.InputStreamReader; 
     8import java.io.UnsupportedEncodingException; 
    79import java.security.InvalidParameterException; 
    810import java.util.LinkedList; 
     
    148150                try { 
    149151                        saxParser = spf.newSAXParser(); 
    150                         inputSource = new InputSource(new FileReader(filename)); 
     152                        inputSource = new InputSource(new InputStreamReader(new FileInputStream(filename), "UTF-16")); 
     153                } catch (UnsupportedEncodingException e) { 
     154                        e.printStackTrace(); 
    151155                } catch (ParserConfigurationException e) { 
    152156                        e.printStackTrace(); 
Note: See TracChangeset for help on using the changeset viewer.