Encodings Trouble
Beatrix Willius
bwillius at gmx.de
Sun Dec 17 19:07:35 CST 2006
While I'm used to having encoding problems the following one has be
stumped: Because the encoding of mail data is in the data itself and
needs to be parsed, I first write the data into the database and do
the parsing later. After updating to Valentina 2.4 this doesn't seem
to work 100%. Some mails don't get parsed correctly.
The data is written to the database:
theCursor.Field("MessageBody").SetString(currentMailFields.MessageBody)
I get the data out of the database:
dim theBody as String = theCursor.field("MessageBody").GetString
At this point I see the UTF8 question marks in a square. I do some
parsing and then define the encoding
'we have a Content Type
if instr(ContentType, "iso-8859-1") > 0 then
'changed from isolatin 1, which didn't work 100%
currentBody = defineEncoding(currentBody, Encodings.MacRomanLatin1)
elseif instr(ContentType, "iso-8859-2") > 0 then
currentBody = defineEncoding(currentBody, Encodings.IsoLatin2)
......
The result are fly droppings instead of nice umlauts. The same code
works for Valentina 1. What am I doing wrong???
Mit freundlichen Grüßen/Regards
Trixi Willius
http://www.mothsoftware.com
Mail Archiver X: archive, clean and search email
http://www.beatrixwillius.de
Fractals, 3d landscapes etc.
More information about the Valentina
mailing list