Idea 11.1 and Idea 12 EAP russian characters problem in Output console

I found a strange behavior. When I write something in System.out or in Log4j on russian language I see "?????" in output console. But this is happens only when I call this from Tomcat 7.0 or JBoss 6.1, and sometimes in TestNG. When I call System.out from public static void main everything looks great.
All sources which calls SOUT in UTF-8. In Settings default encoding set to UTF-8 too. Most strange part in this situation that when I add VM options "-Dfile.encoding=x-MacCyrillic" to Run configuration of Tomcat all russian characters looks good, on JBoss Run configuration that trick works too.

Who know how to get it work without this trick in every run configuration?

My enviroment: OS X 10.8.2,  Java 1.6.0_31

3 comments
Comment actions Permalink

Hey, guys! Please tell me something about this problem. Maybe I'm dumb and don't understand simple things. :)

0
Comment actions Permalink

In IU-123.23 bug still exist.

0
Comment actions Permalink

Maybe "Tomcat 7.0, JBoss 6.1, and TestNG" use System.setErr() and System.setOut() for logging purposes and wrongly convert encodings.
You can add "-Dfile.encoding=x-MacCyrillic" in Defaults template of certain type (JBoss Server or TestNG, see VM Options setting) and it will be added to all newly created configurations.

0

Please sign in to leave a comment.