Hi,
I dont know if it is exactly a bug, but its worth mentioning it, when
transforming DOM XML tree to System.out, it would be nice if the console
would display UTF-8 encoding, suppose this jaxp based code:
public class MyTransformer {
static DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
static Document document;
public static void main(String[] args) {
try {
File f = new File("mgwtransj.xml");
DocumentBuilder builder = factory.newDocumentBuilder();
try {
document = builder.parse(f);
} catch (IOException ioe) {
ioe.printStackTrace();
}
// Use a MyTransformer for output
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
DOMSource source = new DOMSource(document);
FileOutputStream fout = null;
try {
fout = new FileOutputStream("test.xml");
}
[catch..]
StreamResult result = new StreamResult(fout);
StreamResult result2 = new StreamResult(System.out);
transformer.transform(source, result);
transformer.transform(source, result2);
}
[catch..]
I am transforming the Tree to 2 different places, a binary File Stream and to console.
Of course, with the file stream, everything will be nice in my file, completely UTF-8.
On console
i wont get UTF-8 but ASCII (or latin-1) instead, resulting in mismatch for some
special chars.
Is this a problem of System.out aka PrintStream or could this be solved in IDEA?
Thx for hints on this, IMO debugging XML in console is quite useful...
_______________________________________________
Eap-bugs mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-bugs