Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello. I need to print arabic character using C++, the prob is i dont know how to, please guide me step by step, how i write that program, how to use unicode. Please help me iam beginner.
Posted
Comments
Jochen Arndt 14-Oct-15 6:09am    
Which compiler and OS are you using?

1 solution

Writing non-Western characters is much the same as writing western ones. You can do it with wcout or wprintf, something like:
C++
    wstring message = L"السلام عليك";
    cout << message.c_str() << endl;
// or
    wprintf(L"%s\n", message.c_str());

Make sure you use the correct codepage in your command window when running this so the characters display correctly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900