When I read an element value (via Java XPath API) that contains the EURO currency symbol (�), I just get a '?' instead of the currency symbol. I tried to convert the string via severeal methods:
<?xml version="1.0" encoding="iso-8859-1"?>
...
<numberformat>� #,###.00</numberformat>
System.out.println("bytes: "+result.getBytes());
System.out.println("file encoding: "+System.getProperty("file.encoding")); //prints "Cp1252"
System.out.println("1st: "+new String(result.getBytes(), "UTF-8"));
System.out.println("1st: "+new String(result.getBytes("ISO-8859-1"), "UTF-8"));
System.out.println("1st: "+new String(result.getBytes("Cp1252"), "UTF-8"));
System.out.println("1st: "+new String(result.getBytes("UTF-8"), "UTF-8"));
System.out.println("1st: "+new String(result.getBytes(), "Cp1252"));
System.out.println("1st: "+new String(result.getBytes("ISO-8859-1"), "Cp1252"));
System.out.println("1st: "+new String(result.getBytes("Cp1252"), "Cp1252"));
System.out.println("1st: "+new String(result.getBytes("UTF-8"), "Cp1252"));
System.out.println("1st: "+new String(result.getBytes(), "ISO-8859-1"));
System.out.println("1st: "+new String(result.getBytes("ISO-8859-1"), "ISO-8859-1"));
System.out.println("1st: "+new String(result.getBytes("Cp1252"), "ISO-8859-1"));
System.out.println("1st: "+new String(result.getBytes("UTF-8"), "ISO-8859-1"));
But the output is always a '?' at the place of the currency symbol instead of '�'. Is there another way to somehow convert it back?