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.

Bug 201490

Summary: Output: Message from the localized OS should be shown in correct encoding
Product: projects Reporter: Alexandr Scherbatiy <sunflower>
Component: AntAssignee: Milos Kleint <mkleint>
Status: RESOLVED INCOMPLETE    
Severity: normal CC: alexander.burdukov, jhavlin
Priority: P3 Keywords: I18N
Version: 7.0.1   
Hardware: PC   
OS: Other   
Issue Type: DEFECT Exception Reporter:

Description Alexandr Scherbatiy 2011-08-31 13:45:04 UTC
OS: Vista 32 bit Home premium Russian.

Example of the messages from Output pane:
bdj-run:
C:\tmp\netbeansProjects\TMP11111\nbproject\build-impl.xml:642: Execute
failed: java.io.IOException: Cannot run program
"C:\ME_SDK\runtimes\bd-j\bin\emulator" (in directory
"C:\tmp\netbeansProjects\TMP11111"): CreateProcess error=3, Ñèñòåìå
íå óä-åòñÿ í-éòè óê-ç-ííûé ïóòü
BUILD FAILED (total time: 1 minute 30 seconds)
Comment 1 Alexandr Scherbatiy 2011-08-31 13:48:18 UTC
Or create the test method is written not in English language. And print stack trace from this method.  For example, run the following code:

----------------------------------------------------
public class JavaApplication1 {
    
    public static void тест(){
        try {
            Process p = Runtime.getRuntime().exec("ttttttttt");
        } catch (IOException ex) {
            ex.printStackTrace();
        }
        
    }

    public static void main(String[] args) {
        // TODO code application logic here
        тест();
    }
}
----------------------------------------------------

The result is:

java.io.IOException: Cannot run program "ttttttttt": CreateProcess error=2, ?? ??????? ????? ????????? ????
Comment 2 Jaroslav Havlin 2012-11-21 14:38:59 UTC
Output window does not encode bytes to characters. The encoding is handled by task runner that processes Ant output (assuming you have an Ant project).

I think that the encoding specified in system property "file.encoding" should be used. So maybe your system is not configured correctly.

Reassigning to Projects/Ant. Please evaluate. Thank you.
Comment 3 Milos Kleint 2013-05-16 07:13:20 UTC
please attach the IDE log file (http://wiki.netbeans.org/FaqLogMessagesFile).
what encoding is your project?
Comment 4 alexander.burdukov 2013-06-13 18:43:13 UTC
This is not NB issue. The problem can be reproduced even by running this simple app from command line.

The problem is on JDK side. See method win32Error at jdk\src\windows\native\java\lang\ProcessImpl_md.c 

This method does not consider underlying system codepage when throwing IOException