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: | Cygwin compiler to compile C language in the normal console output Chinese, generate exe file and run separately, abnormal output of Chinese characters, can not be output. | ||
---|---|---|---|
Product: | cnd | Reporter: | Icefire |
Component: | -- Other -- | Assignee: | issues@cnd <issues> |
Status: | RESOLVED INCOMPLETE | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.1.1 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
更改编码方式
更改项目的编码法方式 编写的测试程序 控制台输出结果 单独运行two.exe的结果 |
Description
Icefire
2012-06-04 10:13:26 UTC
(acc. to Google Translate) Google Translate: Cygwin compiler to compile C language, the encoding of the project and the compiler is changed to "GB2312" or "GBK" Chinese in the console to normal output, but generate exe executable file is run separately, the Chinese character output exception, can not be blank or garbled output (output). Please, provide steps to reproduce problem. Created attachment 120489 [details]
更改编码方式
Created attachment 120490 [details]
更改项目的编码法方式
Created attachment 120491 [details]
编写的测试程序
Created attachment 120492 [details]
控制台输出结果
Created attachment 120493 [details]
单独运行two.exe的结果
正常启动netbeans,选择“工具”-->“插件”-->“已安装”-->选择“C/C++”-->选择“激活”-->重启netbeans, “新建项目”-->选择“C/C++项目”有提示说必须安装编译器什么的,然后我就按照网页上说的安装了“cygwin”,并且验证成功,然后新建一个C/C++的样例“欢迎使用”,按照步骤,验证成功! 下一步我新建我自己的项目:“two”,选择“工具”-->“选项”-->选择“C/C++”-->更改编码方式为“GB2312”(见图片),-->在项目“two”上右击选择“属性”-->更改编码方式为“GB2312”,新建源文件, 编写简单程序进行验证, 【 #include <stdio.h> #include <stdlib.h> int main(int argc,char** argv) { printf("你好!"); getchar(); return (EXIT_SUCCESS); } 】 输出到控制台成功, 去相应的目录(\two\dist\Debug\Cygwin-Windows)下找到“two.exe”文件单独运行, 输出为乱码! |