On 09/28/2013 07:51 AM, Jonas Maebe wrote:
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).
Thanks Jonas, I'm relieved to see there is already mechanisms in place.
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")
That looks exactly what is needed. Thanks again! _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal