Am 10.12.2015 23:04 schrieb "Mattias Gaertner" <[email protected]>:
>
> On Thu, 10 Dec 2015 19:59:26 +0100
> Sven Barth <[email protected]> wrote:
>
> > Am 10.12.2015 19:53 schrieb "Juha Manninen" <[email protected]>:
> >[...]
> > > A typecast can be used as a workaround now.
> > > UTF8String and AnsiString have the same memory layout so it should
work.
> >
> > This has nothing to do with the memory layout. Both Utf8String and
> > AnsiString are AnsiString types and an assignment to each other or a
> > typecast will result in a codepage conversion if necessary.
>
> What about:
>
> UTF8Delete(AnsiString(Pointer(s)),1,1);

While the typecast itself would probably work I strongly advice against it
since you're relying on implementation details. Also I doubt that you can
do this for var parameters...

Regards,
Sven
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to