On 11.12.2015 15:14, Juha Manninen wrote:
On Fri, Dec 11, 2015 at 4:10 PM, Mattias Gaertner
<nc-gaert...@netcologne.de> wrote:
The job of the wrapper is to convert to type String without
triggering the conversion of the content.

Ok, lots of ugly Pointer typecasts. Doable, yes.


Not necessarily. You can use SetCodePage() to change the code page of the string without triggering a codepage conversion by using the third parameter which is a Boolean that tells the function to either do a conversion (True; default) or not (False). You'd then need to declare the UTF8* routines as RawByteString and explicitly handle the type conversion.

That's at least more officially supported than ugly pointer typecasts...

(Note: it might be that some details don't work as I described them; if in doubt ask on fpc-pascal please)

Regards,
Sven


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to