Page 1 of 1

Load blobs having umlauts

Posted: Thu Nov 27, 2014 10:50 am
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

forgot to mention

Posted: Thu Nov 27, 2014 10:56 am
by Lucian
I am using Delphi 7, the blob is read with Field.AsString, and the import is done using TRvHtmlImporter. That's all.

Posted: Thu Nov 27, 2014 11:11 am
by Sergey Tkachenko
TrvHtmlImporter can import only in two encodings:
- current windows ansi language
- utf-8

Try assigning rvHtmlImporter.Encoding=rvhtmleUTF8

nah, still not good

Posted: Thu Nov 27, 2014 11:22 am
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.

Posted: Thu Nov 27, 2014 11:23 am
by Lucian
Actually you are saying that it might work for most people in Germany, right? I am not located in Germany.

Posted: Fri Nov 28, 2014 10:33 am
by Sergey Tkachenko
Please sent content of this blob to a file (as it is) and send it to richviewgmailcom

Done

Posted: Fri Nov 28, 2014 11:14 am
by Lucian
Mail is out, thanks

Posted: Fri Nov 28, 2014 1:03 pm
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.