Using Unicode

I'm trying to read, store, and output Unicode characters. Specifically █, ▓, ▒, and ░. I've googled some but haven't gotten anything to work. I am programming in visual studio 2010 (which is also brand new to me, used to using Linux), Windows 7.

Here is a code snippet:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
#include <cstdlib>
#include <string>

using namespace std;

int main()
{
	wstring goo = L"█ ▓ ▒ ░";
	wcout << L"█ ▓ ▒ ░" << endl;
	wcout << goo << endl;
	int x;
	while(1)
	{
		cin >> x;
		if(x == 0)
		{
			return 0;
		}
	}
}


Lines 10 and 11 do nothing. It doesn't cout anything.

Please help. Thanks
Last edited on
You can't display Unicode chars in console. Try writing them to a file.
By the way, you don't need Unicode to get ░, etc. ( see http://en.wikipedia.org/wiki/Code_page_437 )
Is there a specific reason to why you opened this topic twice?
Topic archived. No new replies allowed.