On 28 Sep 2013, at 14:38, Andrew Brunner wrote:

> I did see that I can change the default code page, but that is not acceptable 
> where incoming MIME data is concerned.

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")


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to