Problem with Charsets

General TRichView support forum. Please post your questions here
Post Reply
IGDark
Posts: 41
Joined: Wed Jan 18, 2006 11:03 am

Problem with Charsets

Post by IGDark »

Hello,
I have a question... After I enter text into TRichView in Russian, and then clear it (using .Clear() function), and try to write something in the component again, my new text looks like ???. Apparently, the component thinks that I suppose to use English for writing (because I have English Windows + my DEFAULT language is English) text, but my ACTIVE Language at the same time is Russian, so I get this mess in the result.

I need TRichView to use not the default charset, but the active charset... Language can be any, not only Russian.

I would really appreciate your support,
Alex.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Do you use Unicode in TRichViewEdit?

Incorrect charset should not cause '?????'. In case if Western charset used instead of Russian, you should see characters from the second half of Western ANSI table instead of Russian characters (mostly diacritic characters), and applying RUSSIAN_CHARSET to the entered text must restore Russian characters.

'????' looks like a result of conversion from Unicode to ANSI text (to the charset that does not have Russian characters).
But I do not understand how it can happen on typing.

Can you give more details about your application? Can this problem be reproduced in the ActionTest demo?
IGDark
Posts: 41
Joined: Wed Jan 18, 2006 11:03 am

Post by IGDark »

Sorry, It's not like ???, but I just mean that the typed text looks like if you try to type russian letters in ANSI_CHARSET, a whole mess:

...you should see characters from the second half of Western ANSI table instead of Russian characters...

Yea, like this!

What should I do?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Currently, charset is not changed when you type.
You can include rvoAutoSwitchLang in RichViewEdit.EditorOptions property, and charset will be changed when user changes keyboard layout while the editor is focused.
Or use Unicode.
Post Reply