> On Jul 3, 2023, at 3:05 PM, Mattias Gaertner via fpc-pascal
> <fpc-pascal@lists.freepascal.org> wrote:
>
> I wonder, is this thread about testing ChatGPT or do you want to
> implement something useful?
> There are already plenty of optimized UTF-8 functions in the FPC and
> Lazarus sources. Maybe too many, and you have trouble finding the right
> one? Just ask what your function needs to do.
I was just curious how ChatGPTs implementation compared to other programmer.
What I'm really trying to do is improve a parser so it can read UTF-8 files and
decode unicode literals in the grammar.
Right now I've just read the file into an AnsiString and indexing assuming a
fixed character size, which breaks of course if non-1 byte characters exist
I also need to know if I come across something like \u1F496 I need to convert
that to a unicode character.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal