[fpc-pascal] Unicode chars losing information

Marco van de Voort fpc at pascalprogramming.org
Sun Mar 7 23:30:05 CET 2021


Op 2021-03-07 om 22:26 schreef Bart via fpc-pascal:
> On Sun, Mar 7, 2021 at 5:31 PM Marco van de Voort via fpc-pascal
> <fpc-pascal at lists.freepascal.org> wrote:
>
>> Probably it is not in the BMP and thus needs more position than one.
> Length(Char) is 5 according to fpc, I see 5 "graphemes"

Indeed:

.Ld1$strlab:
     .short    1200,2
     .long    -1,5
.Ld1:
     .short    8984,8997,9003,8679,94,0

On win32 a quick test is hard since displaying unicode in the terminal 
is hard.


But a write for "widechar" is called:

    movl    U_$P$PROGRAM_$$_CHARS,%eax
     movw    (%eax),%cx
     movl    %ebx,%edx
     movl    $0,%eax
     call    fpc_write_text_widechar

so it should be ok then.



More information about the fpc-pascal mailing list