Page 1 of 1

TRichView v13.6.2 Problem

Posted: Tue Jan 31, 2012 9:01 am
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]

Posted: Tue Jan 31, 2012 9:05 am
by 376408384
This is the text

ДгєГЛ№µЩ·ТЛЩ¶И·ўЙъµД
ДгєГЛ№µЩ·ТЛЩ¶И·ўЙъµД

Posted: Tue Jan 31, 2012 12:07 pm
by Sergey Tkachenko
Chinese text is processed correctly only if Unicode is used.
Which version of Delphi do you use?

Posted: Tue Jan 31, 2012 12:32 pm
by 376408384
unicode..

Posted: Tue Jan 31, 2012 2:50 pm
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:
[email protected]

Posted: Tue Jan 31, 2012 4:35 pm
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}

Posted: Mon Feb 06, 2012 1:25 am
by 376408384
:lol: Hello Sergey

How to use source code to convert font names from Unicode when saving to RTF?

Posted: Mon Feb 06, 2012 8:17 am
by Sergey Tkachenko
Open RV_Defs.inc and remove "NOT" from the line {NOT$DEFINE RVRTFNOUNICODEFONTNAMES}
Recompile TRichView package.

Posted: Tue Feb 07, 2012 9:14 am
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!!

Posted: Wed Feb 08, 2012 6:05 pm
by Sergey Tkachenko
Make sure that RichViewEdit1.RTFReadProperties.UnicodeMode= rvruOnlyUnicode