I am reading an XML file using Scanner scanner = new Scanner(inputStream, "UTF-8"); and then going line by line using scanner.nextLine().
I have some UTF-8 type text in the XML file that I read and it works perfectly when I run my app locally through the Jetty server in my Eclipse Helios IDE.
However when the app is built and deployed on a tomcat server that we use as out dev server, the UTF-8 characters appear as '?' everywhere. When I put some logs in place I found that the characters were being read that way in spite of me mentioning UTF-8 when I initialize the scanner.
I am unable to understand why it would work locally for me but not when I deploy it on tomcat.
I am sure so many might have come across this before.