none
Encoding detection in TextConverter (Transport addin) RRS feed

  • Question

  • I have an issue with TextConverter using the RtfToText and HtmlToText classes.

    I set InputEncoding to Charset.TryGetEncoding() from the Body.CharSetName, and set OutputEncoding to Unicode.

    In most cases I get correct unicode text, but in same rare cases I get one of two possibilities:

    (1) Unicode embedded in Unicode, i.e. the 0x0412 character is 0x00040012 instead

    (2) I get just ranges of 0xFF

    I can fix (1) with some ugly heursitics, but is there some better way to do this? How does Outlook know how to render the text?

    Thanks

    Tsang Chan

    Monday, September 16, 2013 7:16 AM