RVXML UTF-8 Support

General TRichView support forum. Please post your questions here
Post Reply
[email protected]
Posts: 3
Joined: Mon Oct 05, 2020 12:45 pm

RVXML UTF-8 Support

Post by [email protected] »

I have my xml file imported into Richview but the Thai content as shown in ??????.

I have attached the xml entitled "24300.xml"

And also the demo I have created, compile and run it, click the Import XML button and select 24300.xml

make sure the textstyles.ini is using my attached one.

Thanks
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RVXML UTF-8 Support

Post by Sergey Tkachenko »

Please send files to me by email (richviewgmailcom)
[email protected]
Posts: 3
Joined: Mon Oct 05, 2020 12:45 pm

Re: RVXML UTF-8 Support

Post by [email protected] »

sent
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RVXML UTF-8 Support

Post by Sergey Tkachenko »

You use an old version of TRichView and RichViewXML.
I tested your demo with new version of TRichView. To do it, I had to remove RV_Defs.inc and changed all string parameters to TRVUnicodeString.
After that, I recompiled your demo and loaded XML file.
It looks fine:
xml-thai.png
xml-thai.png (9.63 KiB) Viewed 13100 times
So I suggest to upgrade to the new version.
[email protected]
Posts: 3
Joined: Mon Oct 05, 2020 12:45 pm

Re: RVXML UTF-8 Support

Post by [email protected] »

i am using Delphi 2006 for your information. RVXML 1.22. RichVideEdit 16

"remove RV_Defs.inc"
did you mean you removed the inc from in my demo folder?

"changed all string parameters to TRVUnicodeString"
i dont understand this, what are the string parameters that you are refering to?

Can I have your modified demo source code?

Thanks
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RVXML UTF-8 Support

Post by Sergey Tkachenko »

I suggested to upgrade from your old version of TRichView to the newest version.
Currently, the newest version of TRichView 18.6.

I described the changes that are necessary to compile your project with the new version of TRichView
- delete obsolete version of RV_Defs.inc
- change string parameters of methods.

There are some compatibility issues, i.e. you need to make some changes in your existing projects to make it compatible with TRichView 18.6.
The most important is changing string parameters of methods and events.
Now, all of them must be of TRVUnicodeString type.
For Delphi 2006, TRVUnicodeString is defined as WideString.

For example, in your version, TRichView.GetPictureInfo is defined as
procedure GetPictureInfo(ItemNo: Integer; var AName: AnsiString; var Agr: TGraphic; var AVAlign: TRVVAlign; var ATag: TRVTag);
In the new version, it is
procedure GetPictureInfo(ItemNo: Integer; out AName: TRVUnicodeString; out Agr: TGraphic; out AVAlign: TRVVAlign; out ATag: TRVTag);
Post Reply