Getting Unicode output in Eclipse Console

Tired of seeing garbled Eclipse Console output? Here is a quick and dirty tutorial for getting Unicode output in Eclipse Console.

Fact: You will not get Unicode output in Eclipse Console while using System.out directly in Windows. See Eclipse BUG #13865.

1. add -Dfile.encoding=UTF-8 to your eclipse.ini

2. make sure your Eclipse Console font supports Unicode. You can try it out by typing unicode characters directly to console with keyboard. Console Font is set in Window -> Preferences -> General -> Appearance -> Colors and Fonts -> Debug -> Console Font

3. if you are NOT using Windows, set your system encoding to UTF-8. You should now see Unicode characters in Console after restarting Eclipse.

4. if you are using Windows or do not want to change your OS encoding, you will have to avoid using System.out stream directly. Instead, wrap it up with java.io.PrintStream:
PrintStream sysout = new PrintStream(System.out, true, "UTF-8");

5. if you are using Log4J with ConsoleAppender, make sure to set the encoding property to UTF-8. Example:
#TRACE appender
log4j.appender.stdout.trace.layout.ConversionPattern=%p [%c] - %m%n

Happy development!


  1. This was helpful in solving a problem I was having, thanks. But changing eclipse.ini didn't work for me.

    Instead, I altered the JRE configuration :

    Window > Preferences > Java > Installed JREs ; select JRE ; select Edit

    add to Default VM Arguments: -Dfile.encoding=UTF-8

  2. you are wrong it is possible to have UTF-8 for windows with System.out simple:

    refer: http://bytecounts.com/blog/?p=28

    rules are actual for Windows too.

  3. akhlystov, setting unicode font does not solve system encoding problems (read more about it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=13865)

    This may not be an issue with Windows Vista, though I haven't tried it there yet, only on XP. Anyway, it's better to use loggers instead of printing to System.out.

  4. No I'm not talking about fonts. I'm talking about
    1. Open Run Dialog > "your application" > Common Tab > Console Encoding > Other "set it to UTF-8"

    2. Open Run Dialog > "your application" > Arguments Tab > VM Arguments > Add "-Dfile.encoding=UTF-8"

    and of course Window Menu > General > Workspace > Text file encoding should be set to "UTF-8"

    then you can run your application ( doesn't matter Standalone or inside Tomcat)

    e.g. this code will work:

    public class Hello {

    public static void main(String [] args)
    System.out.println("english letters. русские буквы");
    System.out.println("new Date()= " + new Date());

  5. Thank you!
    I didn't need to alter the Console Font, only added -Dfile.encoding=UTF-8 to eclipse.ini

  6. Thank you all for the comments. Adding -Dfile.encoding=UTF-8 to eclipse.ini wroked for me as well.

  7. thanks, worked on OS X, added -Dfile.encoding=UTF-8 to /Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini

  8. Thank you, this was unbelievably helpful!

  9. Thanks a lot, this problem confused me for long days, altering eclipse.ini solved everything.

  10. This one's better, guys :


  11. Thanks; worked great - glad to finally be able to see what I'm doing in the console.

  12. Thanks!
    But instead of changing .ini file i did that in eclipse: Window -> Preferences-> General -> Workspace -> Text File Encoding -> Other UTF-8

    That was sufficient for me.

    Now i get nice error messages in russian :)

  13. I'm an Eclipse newbie, so take this with a grain of salt, but I managed to get around the problem in Eclipse Indigo SR1 simply by going to Edit > Set Encoding, then choosing UTF-8.

  14. Thanks again! You've helped out me second time:)

  15. This code is great:

    PrintStream sysout = new PrintStream(System.out, true, "UTF-8");


    DJ Guo


Spam comments (i.e. ones that contain links to web development services) will be reported along with user profiles!

Note: only a member of this blog may post a comment.