TRichEdit and Unicode - different behavior on XP and Win7

408 views Asked by At

In non-unicode Delphi (I've tried with D7 and D2006):

  1. Put a TRichEdit on the form and run the application
  2. Switch to some "exotic" keyboard layout (Russian, Greek, whatever)
  3. Type something

On XP, everything is good and I can see normal Russian letters. However, on Win7 characters are wrong (accented letters from other languages). If I copy Russian text from MS Word and paste it to RichEdit, it looks OK.

I suspect it is something related to RichEdit control version, but it there any way to overcome it? If possible, I would like to avoid switching to TTntRichEdit (which appears to work correctly), as I would need to change lots of existing code.

1

There are 1 answers

2
JohnAR On

Try to use converions like AnsiToUtf8 or AnsiToUnicode, when user presses a key.