Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • posted code snip iam pretty much confused about this file.encoding Commented Jan 30, 2010 at 16:05
  • Okay.. How about the stdout? The thing where the System.out.printXX() goes to. Did it use the proper encoding? E.g. if in an IDE, this is configureable in its preferences, or if in command console, this is configureable in its preferences. I don't do linux extensively, but it look like that the -Dfile.encoding has somehow actually influence on stdout encoding in linux's JVM. Commented Jan 30, 2010 at 16:07
  • iam running it from the cmd prompt and printing it there. Also i am copying the same class file compiled on windows on to linux and running it Commented Jan 30, 2010 at 16:10
  • 1
    Well, then you basically just need to configure the cmd so that it uses the proper encoding to display those characters. Just to test, try to write those chars into a file (not as file name! but as file content) using OutputStreamWriter(file, encoding) and you should see that the characters are properly written (as long as your file viewer recognizes/uses the proper encoding to display them ;) ). Commented Jan 30, 2010 at 16:11
  • can you tell what cfg is needed on cmd prompt? Commented Jan 30, 2010 at 16:13