
Originally Posted by
erttuy11
why
utf-8 sequence error??
replace XMLDomMapleData change complete
easy to fix
in XMLDomMapleData.java
change
PHP Code:
public XMLDomMapleData(final FileInputStream fis, final File imageDataDir) {
try {
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
Document document = documentBuilder.parse(fis);
this.node = document.getFirstChild();
} catch (ParserConfigurationException e) {
throw new RuntimeException(e);
} catch (SAXException e) {
throw new RuntimeException(e);
} catch (IOException e) {
throw new RuntimeException(e);
}
this.imageDataDir = imageDataDir;
}
to
PHP Code:
public XMLDomMapleData(FileInputStream fis, File imageDataDir) {
try {
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
Reader reader = new InputStreamReader(fis, "UTF-8"); // Parse Special Characters Using UTF-8
InputSource source = new InputSource(reader);
Document document = documentBuilder.parse(source);
this.node = document.getFirstChild();
} catch (ParserConfigurationException | SAXException | IOException e) {
throw new RuntimeException(e);
}
this.imageDataDir = imageDataDir;
}