[fpc-pascal] Status of UTF8

Andrew Brunner atbrunner at aurawin.com
Sat Sep 28 14:56:51 CEST 2013


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!



More information about the fpc-pascal mailing list