Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 163697 - i18n - cannot use utf-8 encoding in none english locale on windows
i18n - cannot use utf-8 encoding in none english locale on windows
Product: java
Classification: Unclassified
Component: Compiler
All Windows XP
: P2 (vote)
: 6.x
Assigned To: Dusan Balek
: I18N
: 164427 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2009-04-26 22:42 UTC by mvanek
Modified: 2009-05-11 11:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

messages log (42.86 KB, text/plain)
2009-04-26 22:45 UTC, mvanek

Note You need to log in before you can comment on or make changes to this bug.
Description mvanek 2009-04-26 22:42:55 UTC
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
        at javaapplication9.Main.main(
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
Comment 1 mvanek 2009-04-26 22:45:28 UTC
Created attachment 80945 [details]
messages log
Comment 2 Jiri Prox 2009-04-27 11:15:42 UTC
What is code at line Mina:19 ? 
Comment 3 mvanek 2009-04-27 11:23:35 UTC
line 19: System.out.println(".んZZZ終");
Comment 4 mvanek 2009-04-27 11:30:09 UTC
More description about behaviour:

I created a new java project and put System.out.println(".んZZZ終"); to class.
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.

java.lang.NoClassDefFoundError: javaapplication9/スイテテイス
Caused by: java.lang.ClassNotFoundException: javaapplication9.スイテテイス
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at java.lang.ClassLoader.loadClassInternal(
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終
Comment 5 Vitezslav Stejskal 2009-05-04 11:56:48 UTC
Does your project use Compile On Save? This could be related to issue #121727.
Comment 6 ecastro 2009-05-05 07:50:38 UTC
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.
Comment 7 mvanek 2009-05-05 08:31:54 UTC
VStejskal: I am using compile on save. 
Comment 8 Dusan Balek 2009-05-05 10:36:57 UTC
Fixed in jet-main.
Comment 9 Quality Engineering 2009-05-07 07:49:07 UTC
Integrated into 'main-golden', will be available in build *200905070201* on (upload may still be in progress)
User: Dusan Balek <>
Log: Issue #163697: cannot use utf-8 encoding in none english locale - fixed.
Comment 10 Jan Jancura 2009-05-11 11:39:57 UTC
*** Issue 164427 has been marked as a duplicate of this issue. ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo