Load blobs having umlauts

General TRichView support forum. Please post your questions here
Post Reply
Lucian
Posts: 56
Joined: Fri Aug 01, 2014 9:52 am

Load blobs having umlauts

Post by Lucian »

Hi,

I am trying to load a blob in a TRichViewEdit control. The blob is the actual html from some email and it's german, it has umlauts and things like that. I tried many combinations, however I get this:

äüöß ÄÖÜ

instead of this:

дьцЯ ДЦЬ

How can I do this properly, please?
Thanks
Lucian
Posts: 56
Joined: Fri Aug 01, 2014 9:52 am

forgot to mention

Post by Lucian »

I am using Delphi 7, the blob is read with Field.AsString, and the import is done using TRvHtmlImporter. That's all.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

TrvHtmlImporter can import only in two encodings:
- current windows ansi language
- utf-8

Try assigning rvHtmlImporter.Encoding=rvhtmleUTF8
Lucian
Posts: 56
Joined: Fri Aug 01, 2014 9:52 am

nah, still not good

Post by Lucian »

I tried that and when I do I get missing text, for example I get this:

END.

instead of this:

Standard-Testmail äüöß ÄÖÜ
END.

The line starting with "Standard" is lost altogether.
Lucian
Posts: 56
Joined: Fri Aug 01, 2014 9:52 am

Post by Lucian »

Actually you are saying that it might work for most people in Germany, right? I am not located in Germany.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please sent content of this blob to a file (as it is) and send it to richviewgmailcom
Lucian
Posts: 56
Joined: Fri Aug 01, 2014 9:52 am

Done

Post by Lucian »

Mail is out, thanks
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I received it,

The file says its encoding is iso-8859-1. This encoding is very similar to Windows encoding for western languages (1252). It's not only for Germany, but for English, French, Spanish, Portuguese too.

So it is not UTF-8, assign rvHtmlImporter.Encoding back to rvhtmleANSI.

If you'd use Unicode versions of Delphi, you could specify RVStyle.DefCodePage=1252 before loading.

For Delphi 7, you can try assigning Charset = ANSI_CHARSET for all RVStyle.TextStyles before loading.
Post Reply