本文介绍了我看不到俄罗斯alpabet在Visual Studio 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Visual Studio 2008中输出俄语单词。我写道:

I'm trying to output Russian words in Visual Studio 2008. I wrote:

#include <iostream>
#include <locale.h>
using namespace std;

void main()
{
    setlocale(LC_ALL,"rus");
    cout << "Я хочу видеть это по-русски!";
}


$ b 在Visual Studio中保存文件,我收到以下提示:

When I pressed + to save the file in Visual Studio, I received the following prompt:

我选择了使用其他编码保存选项并选择Cyrillic(Windows)代码页1251.但是,当我运行我的程序时,控制台输出如下所示:

I chose the option "Save with other Encoding" and selected "Cyrillic (Windows) - Codepage 1251." However, when I run my program, the console output appears as follows:

???????? ??? ????

有人可以帮助我吗?

推荐答案

问题是,你不使用Unicode字符集(wstring,wcout作为@
BìnhNguyên已经提到)。有两种方法可以解决此问题:


1.使用unicode字符集。

2.转到控制面板 - >区域和语言 - >管理Tab - >非Unicode程序的语言 - >更改系统区域设置... - >选择俄罗斯。

The problem is that you aren't using Unicode characters set (wstring, wcout as @Bình Nguyên have already mentioned). There are two ways to solve this problem:

1. Use unicode characters set.
2. Go to Control Panel -> Region and Language -> Administrative Tab -> Language for non-Unicode programs -> Change system locale... -> choose Russia.

这篇关于我看不到俄罗斯alpabet在Visual Studio 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 23:35