Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
||
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[18.227.190.93] |
|
Сообщ.
#1
,
|
|
|
Hi,
I have CRichEditCtrl and I write text with different languages there. How could I get unicode characters right? Currently I get only question marks in place of them ("?"). My project uses _MBCS.. PLEASE help, Oxy |
Сообщ.
#2
,
|
|
|
Цитата In Rich Edit 2.0, if you create a Unicode rich edit control (one that expects Unicode text messages), you must specify only Unicode data in any window messages sent to the control. Similarly, if you create an ANSI rich edit control, send only ANSI or DBCS data. You can use the IsWindowUnicode function to determine whether a rich edit control uses Unicode text messages. Note that the rich edit COM interfaces use Unicode text unless they encounter a code page argument. Выводы: проверь, окно RichEdit у тебя IsWindowUnicode()? Ты используешь 2.0 или 3.0 версию? И вообще, в MSDN много написано про поддержу Unicode, всё должно работать. |
Сообщ.
#3
,
|
|
|
Thanks for reply.
IsWindowUnicode() returns true; But when you mentioned, I realized that I use standard rich edit control that comes with VC++ 6.0. Then I tried 2nd version, even "MS Rich Text Box Control 6.0", but still no luck. Now I end up with _UNICODE definition AND CEdit class wich returns real characters (not "?") and doesn't change edit box value in this code: CString g; ce.GetWindowText(g); // CEdit ce; ce.SetWindowText(g); When I use this code with any of rich edit controls I mentioned above, the value of edit control is changed to ANSI characters (all russian or any other international chars are converted to "?")... I don't understand this :\ I could be happy with that, but as far as I know Win9x doesn't support unicode, so won't my project work on Win9x? Oxy P.S. I speak/understand russian, but I would type very slowly and poorly, so sorry for using english. |
Сообщ.
#4
,
|
|
|
Попробуй получить текст и перекодировать MultiByteToWideChar. Криво, но работает ... мне хватает! ;D
|