Page 1 of 1

Firebird blob fields with RTF and charset UTF8

Posted: Wed Dec 04, 2013 1:54 pm
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

Posted: Thu Dec 05, 2013 1:08 pm
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?

Firebird blob fields with RTF and charset UTF8

Posted: Thu May 15, 2014 10:15 am
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

Posted: Thu May 15, 2014 11:06 am
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?