<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 28 Sep 2013, at 14:38, Andrew Brunner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">I did see that I can change the default code page, but that is not acceptable where incoming MIME data is concerned.</span></blockquote><br></div><div>That global variable specifies the default code page for the plain ansistring type. It is not intended to be changed all the time in the first place. You can read your data into a RawByteString and then call SetCodePage(rawbytestr,codepagenr,false) to set its code page to whatever the code page of the data in that string is (without attempting to convert the data, which is what the last "false" parameter indicates). You can then convert it into UTF-8 by calling SetCodePage(rawbytestr,CP_UTF8), or the equivalent SetCodePage(rawbytestr,CP_UTF8,true) (the last parameter is a default parameter with value "true")</div><div><br></div><div><br></div><div>Jonas</div></body></html>