tags:

views:

20

answers:

1

STEP 1: I have a text file, which has the following contents in different languages, and i saved the file by encoding format as "Unicode".

  1. Romanian: Pot să mănânc sticlă și ea nu mă rănește.
  2. Ukrainian: Я можу їсти шкло, й воно мені не пошкодить.
  3. Armenian: Կրնամ ապակի ուտել և ինծի անհանգիստ չըներ։
  4. Georgian: მინას ვჭამ და არა მტკივა.
  5. Hindi: मैं काँच खा सकता हूँ, मुझे उस से कोई पीडा नहीं होती.
  6. Hebrew(2): אני יכול לאכול זכוכית וזה לא מזיק לי.
  7. Yiddish(2): איך קען עסן גלאָז און עס טוט מיר נישט װײ.
  8. Japanese: 私はガラスを食べられます。それは私を傷つけません。
  9. Thai: ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ

STEP 2: I have created a project in MFC, VC++ environment which supports Unicode( changed in project settings to support Unicode). The project has a text box control. I want to display the above contents from the file in the textbox control in the project.

But if i display it. It is either showing as ???????? or every charcter is displayed as "box kindof" things. even i used MultiByteToWideChar and WideCharToMultiByte for converting. but still the same.

Note: Even if i copy the text & paste it in textbox, it is showing as ??????. If we copy paste in visual studio editor( any .cpp or .h file ), it can able to display properly.

Can u please suggest me for this.

+1  A: 

Considering that your question is at least incomplete I will give you just a hint: you should not use MultiByteToWideChar or WideCharToMultiByte in your code at all. If you are building an true Unicode application and you are reading Unicode files you do not need to do any conversion at all.

Box kind-of characters - these indicates that the current font does not contain the glyphs you need.

Considering that you are very new to stackoverflow, please spend some time analyzing how you should put a proper question: title, content, example code and proper tags.

Do your homework before asking, if you do not invest enough time in your question people will not give you good responses and you may even get negative feedback.

Sorin Sbarnea
+1 - I see a lot of poorly thought-out questions these days where the asker does not appear to have done *any* reading or googling beforehand.
chryss