Angus Robertson - Magenta Systems Ltd wrote:
> I'm trying to display Unicode POP3 email from TMimeDecodeEx with
> THtmlViewer v11, loading from a stream (with images from TSslHttpCli).
> I'm using D2007 with Tnt unicode components, and I can display all
> languages and charsets correctly with TTntRichEdit, but THtmlViewer is
> much harder (but better formatted display).
> 
> I'm not sure if Unicode support in THtmlViewer is actually finished
> and tested, or partially done.  It only seemed to check from a stream
> or file BOM, so I updated the code to allow a code page to be
> specified when loading a stream (without BOM).  It now seems to
> display Chinese if the stream is UTF8, but not if it's charset gb2312
> or codepage 936, ie 8-bit. 

That is very likely caused by a bug in TMimeDecode that reads into a
constant sized buffer. It simply happens that multibyte codepoints are
split, some bytes in one and the rest in the second buffer. As a result
conversion to Unicode fails.
 
-- 
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to