I'm trying to read UTF-8 from a text file and do some tokenization, but I'm having issues with the encoding:
try {
    fis = new FileInputStream(fName);
} catch (FileNotFoundException ex) {
    //...
}
DataInputStream myInput = new DataInputStream(fis);
    try {
        while (thisLine = myInput.readLine()) != null) {
            StringTokenizer st = new StringTokenizer(thisLine, ";");
            while (st.hasMoreElements()) {
            // do something with st.nextToken();
    }
}
} catch (Exception e) {
//...
}
and DataInputStream doesn't have any parameters to set the encoding!
 
     
     
     
     
     
    