Page 1 of 1
RVXML UTF-8 Support
Posted: Mon Oct 05, 2020 12:53 pm
by cychia@gmail.com
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
Re: RVXML UTF-8 Support
Posted: Mon Oct 05, 2020 3:55 pm
by Sergey Tkachenko
Please send files to me by email (richviewgmailcom)
Re: RVXML UTF-8 Support
Posted: Tue Oct 06, 2020 1:15 am
by cychia@gmail.com
sent
Re: RVXML UTF-8 Support
Posted: Tue Oct 06, 2020 9:05 am
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 (9.63 KiB) Viewed 14728 times
So I suggest to upgrade to the new version.
Re: RVXML UTF-8 Support
Posted: Wed Oct 07, 2020 10:56 am
by cychia@gmail.com
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
Re: RVXML UTF-8 Support
Posted: Wed Oct 07, 2020 12:15 pm
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);