how can i use arabic language with c++ ?

  • Thread starter Thread starter namespace M.Ismail
  • Start date Start date
N

namespace M.Ismail

Guest
Hello guys ,

I want to write a code that is able to display arabic language ,lets say something like this :

//******

string s;

s="اختبار" ; //// i write the word "test" tranlsated in arabic

cout << s;

//********

of course it didnt work which i was expecting , i tried to google "using arabic in c++" and many people are talking about lots of terms i honestly never cared about as i was happy using only English language with class std::string for 6 years now, so i will summarize my questions according to what i found on the web but didnt understand:


1- what is "UTF-8" , "UTF-16"(many said this one is harmful !) , "UNICODE" ??? is one of them is used by default in c++ ? can i switch between them?

2- what is "wide characters" from which wstring & wcout are derived ??

3- I am using visual studio 2010 , windows 7 64bit , does this make any difference ?

4- If instead of using consol , i may use win32 API , how things would change ? is there a direct way in win32 to deal with arabic language ?

I know some of you would say that i need to read a lot about this matter .well, i have no problem in reading but articles on the web arent organized AT ALL so is there any well-organized reference?I have always considered c++ to be the BEST programming language ever , why it is in a deep miss & chaos in this topic ?

i have always considered c++ to be the best language EVER , why c++ is in a deep miss & chaos in this topic (character representation) ??


could anyone help me please ,this topic of characters is totally new to me?? even you can recommend a book that detailed this topic .


Thanks in advance

Continue reading...
 
Back
Top