This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | add -J-Dfile.encoding=UTF-8 to netbeans_default_options parameter in netbeans.conf to fix unicode problem on windows systems. | ||
---|---|---|---|
Product: | platform | Reporter: | ravshansbox |
Component: | Data Systems | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | REOPENED --- | ||
Severity: | normal | CC: | anebuzelsky, cezariusz, tzezula |
Priority: | P3 | ||
Version: | 8.0.2 | ||
Hardware: | PC | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
ravshansbox
2015-05-22 06:31:08 UTC
Enforcing this encoding setting for all users does not sound right. What is exactly the problem to be resolved? I will give you an example. I have a platform application which requires to run with UTF (because a third-party library always uses UTF-8). So I added "-J-Dfile.encoding=UTF-8" to the project.properties. But then when I started the application, all logs in the console output were corrupted because of the encoding differences. So I had to manually add -J-Dfile.encoding=UTF-8 to netbeans_default_options parameter in the netbeans.conf file, and I have to repeat this for each daily build. And all other developers working on Windows have to this as well. In fact the correct way how to solve the problem is to use FileEncodingQuery. In Ant Based J2SE (WEB, J2EE) Projects it's done by source.encoding property. When source.encoding is set the IDE runs the app with the encoding and configures the output to use the encoding. I am not sure if the same property is used by harness project, I will try to find. In fact it's problem of JRE/JDK that it uses platform default encoding instead of setting it to a more modern one (still hoping that JDK9 may solve the problem in future), but still there is a way to help all developers who uses windows working around this problem. I could work around this bug by setting environment variables: JAVA_OPTS, MAVEN_OPTS and JAVA_TOOL_OPTIONS to include "-Dfile.encoding=UTF-8". |