I am running NB on win XP in Japanese locale.
If I try to input japanese characters into editor and run a file, building file fails.
The project encoding is set to UTF-8.
got this error:
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code
Java Result: 1
あAAA始BUILD SUCCESSFUL (total time: 5 seconds)んZZZ終
If I switch project encoding to windows31j and do the same process, file is successfully compiled.
Using mbytes in UTF-8 worked in versions NB6.5.1 and M3
Created attachment 80945 [details]
What is code at line Mina:19 ?
line 19: System.out.println(".んZZZ終");
More description about behaviour:
I created a new java project and put System.out.println(".んZZZ終"); to
The build fails. After that I restarted NB and tried to run file again.
The build is successful and the text is printed to output window.
If I create a new class with mbytes and then try to print some mbytes,
error appears. After NB restart it is still there.
Caused by: java.lang.ClassNotFoundException: javaapplication9.ｽｲﾃﾃｲｽ
at java.security.AccessController.doPrivileged(Native Method)
Could not find the main class: javaapplication9.ｽｲﾃﾃｲｽ. Program will exit.
Exception in thread "main" Java Result: 1
あAAA始BUILD SUCCESSFUL (total time: 1 second)んZZZ終
Does your project use Compile On Save? This could be related to issue #121727.
I tried the procedure described here on a Windows XP French edition (the standard CP1252 encoding).
Yes, the fault is (at least) to the Compile On Save.
When I remove it, mo more encoding problems occurs with Java file contents nor Java file names while compiling.
However, with exotic Java file names, the IDE still report errors (I guess it uses the same mechanism than
Compile On Save).
Futhermore, it breaks the renaming of class names in Refactoring.
And I don't think it is related to issue #121727.
There is no encoding changes, and it happens even if one trashed the /var/cache
Now, I am sure that my issue 164427 is a duplicate of this.
VStejskal: I am using compile on save.
Fixed in jet-main.
Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Dusan Balek <email@example.com>
Log: Issue #163697: cannot use utf-8 encoding in none english locale - fixed.
*** Issue 164427 has been marked as a duplicate of this issue. ***