At the moment I want to write the content of TRichView to a database field with Delphi 7 in non unicode format. As such I use SaveRVFToStream(MyStream, false).
Now the question is, what will happen if I will porting my applications to Delphi XE with unicode? Will I still be able to use that db-data saved with the old Delphi 7 application or will there be a problem than, as XE will be Unicode enabled?
Is it better to save the binary format in UTF8 in D7 too, instead simple ansistring? Does RV use its own internal binary format, so it will not be a problem at all, as there is no unicode or ansi involved here?
Compatibility unicode<->non-unicode RVF-file content?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Ok thanks, but what happens the other way around, when I load the data saved with XE with my old D7 application? Would that not give problems with unicode data?
So I think about to save in D7 my richtext in UTF8 to the database, but I'm not sure what I exactly must do, as the RVF seems to be binary data? So where should I convert the data to UTF8 without to convert the binary data to UTF8?
So I think about to save in D7 my richtext in UTF8 to the database, but I'm not sure what I exactly must do, as the RVF seems to be binary data? So where should I convert the data to UTF8 without to convert the binary data to UTF8?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
If you use new version of TRichView (11 or newer) in Delphi 7 to load RVF data saved in Delphi XE, then:
- text styles will be loaded as Unicode (assuming that RVF contains collections of RVF styles inside)
- string properties and tag strings (that were stored as UTF-8) will be loaded as ANSI text (converted from UTF-8 to ANSI).
RVF files saved by TRichView compiled in Delphi 2009-XE and compiled in Delphi 3-2007 are slightly different. In Unicode versions of Delphi, item properties and tags are saved as UTF-8. In older version, as ANSI text. TRichView version 11 or newer can distinguish these files, and load them correctly, converting to/from UTF-8 when necessary.
You should not convert to UTF-8 yourself. In Delphi 3-2007, TRichView assumes ANSI text in string properties and tags. If you will use UTF-8 there, these files will not be loaded correctly by applications compiled in Delphi 2009-XE.
- text styles will be loaded as Unicode (assuming that RVF contains collections of RVF styles inside)
- string properties and tag strings (that were stored as UTF-8) will be loaded as ANSI text (converted from UTF-8 to ANSI).
RVF files saved by TRichView compiled in Delphi 2009-XE and compiled in Delphi 3-2007 are slightly different. In Unicode versions of Delphi, item properties and tags are saved as UTF-8. In older version, as ANSI text. TRichView version 11 or newer can distinguish these files, and load them correctly, converting to/from UTF-8 when necessary.
You should not convert to UTF-8 yourself. In Delphi 3-2007, TRichView assumes ANSI text in string properties and tags. If you will use UTF-8 there, these files will not be loaded correctly by applications compiled in Delphi 2009-XE.