I want to display an Arabic message mixed with Chinese using wcout.
The following code is OK:
#include <iostream>
using namespace std;
int main()
{
wcout.imbue(locale("chs"));
wcout << L"中文"; // OK
}
However, the following code doesn't work:
#include <iostream>
using namespace std;
int main()
{
wcout.imbue(locale(/* What to place here ??? */));
wcout << L"أَبْجَدِيَّة عَرَبِيَّة中文"; // Output nothing. VC++ 2012 on Win7 x64
// Why does the main advantage of unicode not apply here?
}
I think the concept of code pages should be deprecated after the adoption of unicode.
Q1. What's the mechanism of wout's displaying such a text?
Q2. Why does Windows, as a unicode-based OS, not support outputting unicode characters in its console window?