英文环境输出中文【chcp 936 无效页解决方案】
来源:互联网 发布:广州编程培训机构 编辑:程序博客网 时间:2024/05/18 00:29
一开始在vs2010 beta2里不能输出中文,最简单代码:
#include<stdio.h>
int main()
{
printf("汉字");
return 0;
}
错误信息是:
warning C4566: character represented by universal-character-name '/u6C49' cannot be represented in the current code page (1252)
warning C4566: character represented by universal-character-name '/u5B57' cannot be represented in the current code page (1252)
一开始一直在修改输出流的编码方式,网上的各种方法都不行,最后在csdn论坛上问得到提示,可能是codepage的问题,
我在cmd.exe里输入chcp,出来的是437就是美国的代码页,但是当输入chcp 936的时候,提示无效代码页,我去注册表了看了,在database->codepage有936该子键,很纳闷这个是为什么?
因为得系统是英文的,System locale也是US的,所以默认的codepage才是437.
但是我把我的System locale改成Chinese(PRC)之后,重启,默认的codepage就是936了。
当我是英文的System locale的时候,输入chcp 936显示无效代码页,这个问题还是没解决,很奇怪,我明明找的到!
System locale 的作用:This setting(System locale) controls the lanusge used when displaying text in programs that do not support Unicode.
- 英文环境输出中文【chcp 936 无效页解决方案】
- 英文操作系统(chcp:437)让Console输出UTF-8
- CHCP
- OpenGL 输出中文 英文 数字
- cmd chcp命令切换字符格式 cmd重定向输出到文件出现中文乱码的处理方法
- Debian英文环境中文输入法
- 英文环境使用中文输入法
- 怎么让中文环境的系统用gcc编译程序时输出内容为英文
- chcp 改变command的输出编码
- Debian 英文环境变中文环境
- RHEL6:中文环境切换成英文环境
- 英文版Ubuntu Firefox中文乱码解决方案
- PDFLIB打印PDF,能输出中文英文
- 捷克下chcp 437命令无效, Microsoft的bug?
- jsp sql 查询中文时无效,英文正常
- ubuntu英文环境下使用中文输入法
- debian英文环境中中文输入
- fedora 英文环境使用中文输入法
- Windows Live Writer 和好用的代碼插件
- WinCE 6.0中的模拟器使用介绍
- Oracle数据库导入后,表中的数据中文显示正常,包中的中文全为问号
- 网址
- memset的用法
- 英文环境输出中文【chcp 936 无效页解决方案】
- 在Flex中如何将WebService中返回的DataTable绑定到DataGrid中
- Create custom checkbox style button for iPhone
- Navicat for mysql 远程连接 mySql数据库10061错误问题
- Asp基本知识
- 五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)
- IE6下z-index犯癫不起作用bug的初步研究
- 当ORACLE归档日志满后如何正确删除归档日志
- 使用fread 注意事项