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".How to Display Multiple Language Characters in a Control
- Romanian: Pot să mănânc sticlă şi ea nu mă răneşte.
- Ukrainian Я могу есть стекло, и оно мне не повредит.
- Armenian: Կրնամ ապակի ուտել եւ ինծի անհանգիստ չըներ.
- Georgian: მინას ვჭამ და არა მტკივა.
- Hindi: मैं काँच खा सकता हूँ, मुझे उस से कोई पीडा नहीं होती.
- Hebrew (2): אני יכול לאכול זכוכית וזה לא מזיק לי.
- Yiddish (2): איך קען עסן גלאָז און עס טוט מיר נישט וויי.
- Japanese: 私 は ガ ラ ス を 食 べ ら れ ま す. そ れ は 私 を 傷 つ け ま せ ん.
- 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.
Which programming language, OS, development environment, ...? What have you done so far? Show us the relevant parts of your code. – Philipp
Also, how are the characters being encoded in the file itself? Are they Ansi or Unicode? If they are not Unicode to begin with, then you have to first decode them to their Unicode equivilents before then putting them into the Control. Also, make sure the Control is using a Unicode font that is capable of displaying those characters. –
Я сейчас правильно обновил вопрос. извините за предыдущий вопрос, который я не дал четкой спецификации. – user408524