Firebird blob fields with RTF and charset UTF8

General TRichView support forum. Please post your questions here
Post Reply
anvanderlinde
Posts: 4
Joined: Mon May 03, 2010 7:56 pm

Firebird blob fields with RTF and charset UTF8

Post by anvanderlinde »

Hello,

We run into a problem. We have our firebird database converted to UTF8 charset. In blob fields we RTF code stored.

When requesting a tDBrichviewedit we see instead of our RTF fields. Weird characters

It seems he does UTF8 encoding twice or something.

How can we prevent this?

We tested it with v12 and v14 and we use Delphi XE and Delphi XE5.

Thanks for your answer!

An VanderLinde
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

RTF (if it does not contain pictures saved in binary form) contains only characters in codes less than 128.
These characters are identical in all character sets and in UTF-8, so double encoding and decoding must not be a problem.

Question 1: how is RTF saved in this field? Do you use TDBRichViewEdit or do you save it manually?
anvanderlinde
Posts: 4
Joined: Mon May 03, 2010 7:56 pm

Firebird blob fields with RTF and charset UTF8

Post by anvanderlinde »

Sorry for my late response!

We actually use the TDBRichViewEdit. Previously, we had no charset in the database, but if we convert it to UTF8 we get the RTF back in strange characters.

Maybe we should adjust settings or something?

Thanks!

An VanderLinde
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Can you save the field content in a file:
dataset.FieldByName(FieldName) as TBlobField).SaveToStream(FileStream)
and send this file to me?
Post Reply