I am trying to display a simple Unicode string in an MFC view class. The problem can be simplified to the following code
CString arabic (_T("مرحبا العالم"));
pDC->TextOutW (50, 50, arabic);
The problem is that the MFC window displays bars instead of the Arabic characters as shown in the screenshot below. Can someone tell what I am doing wrong?
I am using VS 2003 if that matters.
EDIT: When I have selected a font object in the device context, the behaviour of the application changes but it's still not correct; it displays the following characters as if I am using the wrong codepage: