TRichView v13.6.2 Problem

General TRichView support forum. Please post your questions here
Post Reply
376408384
Posts: 20
Joined: Wed Apr 20, 2011 10:20 am

TRichView v13.6.2 Problem

Post by 376408384 »

Image

when I choose some Chinese£¬it doesn't display correctly, it shows the messy code!

When I Save some Chinese as RTF and open it with the wordpad.exe
it will show the messy code!
[/quote]
376408384
Posts: 20
Joined: Wed Apr 20, 2011 10:20 am

Post by 376408384 »

This is the text

ДгєГЛ№µЩ·ТЛЩ¶И·ўЙъµД
ДгєГЛ№µЩ·ТЛЩ¶И·ўЙъµД
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Chinese text is processed correctly only if Unicode is used.
Which version of Delphi do you use?
376408384
Posts: 20
Joined: Wed Apr 20, 2011 10:20 am

Post by 376408384 »

unicode..
376408384
Posts: 20
Joined: Wed Apr 20, 2011 10:20 am

Post by 376408384 »

Ok,work in Unicode! But the problem still exists, I change Some text font stytle and save as RTF.Open the RTF with Wordpad.exe the font name will show in front of text!..I use XE2! I send the Sameple test to your Email:
richview@gmail.com
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This is a wordpad/richedit bug: it incorrectly processes Unicode characters in font names. As you can see, only Chinese font names appear in the document. And, as you can see, this document is loaded correctly in MS Word and TRichView itself.

TRichView has an option for converting font names from Unicode when saving to RTF. You need a source code to apply it. Open RV_Defs.inc and remove NOT from {NOT$DEFINE RVRTFNOUNICODEFONTNAMES}
376408384
Posts: 20
Joined: Wed Apr 20, 2011 10:20 am

Post by 376408384 »

:lol: Hello Sergey

How to use source code to convert font names from Unicode when saving to RTF?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Open RV_Defs.inc and remove "NOT" from the line {NOT$DEFINE RVRTFNOUNICODEFONTNAMES}
Recompile TRichView package.
376408384
Posts: 20
Joined: Wed Apr 20, 2011 10:20 am

Post by 376408384 »

:lol: Hello Sergey ..The problem of saving RTF is fixed,But When I use
the RichViewEdit to load RTF and choose some Chinese,The problem of
displaying correctly still exist!! It shows the messy code! My application compile in Unicode!

I use your demo unicode application----RVEditDemo to load the RTF , the problem still exist!!
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Make sure that RichViewEdit1.RTFReadProperties.UnicodeMode= rvruOnlyUnicode
Post Reply