Arabic characters in a console window
-
I want to create a console application (using Visual C++ 6.0) that can input and output Arabic characters. I tried the following code:
#define UNICODE
#include <tchar.h>
#include <iostream>int main()
{
TCHAR in[10];
std::wcin >> in;
std::wcout << in;
}When I run the program I try to type an Arabic word, but strange characters appear (those at the 2nd half of the ASCII table). The "cout" statement does absolutely nothing. All help would be appreciated. Thank you in advance.
Hosam Aly Mahmoud
-
I want to create a console application (using Visual C++ 6.0) that can input and output Arabic characters. I tried the following code:
#define UNICODE
#include <tchar.h>
#include <iostream>int main()
{
TCHAR in[10];
std::wcin >> in;
std::wcout << in;
}When I run the program I try to type an Arabic word, but strange characters appear (those at the 2nd half of the ASCII table). The "cout" statement does absolutely nothing. All help would be appreciated. Thank you in advance.
Hosam Aly Mahmoud
I've never run any arabic (or non western for that matter) OS before, so I can only speculate. If you output only one arabic character, do you get two funny looking characters? If that's the case, it seems that the console is not UNICODE at all. If there's a 1:1 ratio between arabic characters and funny looking characters, then I'd assume that the font used in the console does not have the arabic letters. -- 20 eyes in my head, they're all the same![^]