RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-28 Thread Andrew Tropin
On 2024-06-26 14:26, Maxime Devos wrote: >>No; he wrote é, U+0065 LATIN SMALL LETTER E + U+0301 COMBINING ACUTE ACCENT, >>which is two characters unlike Γ©, LATIN SMALL LETTER E WITH ACUTE. >> >>Likewise πŸ‘¨β€πŸ­ is U+1F468 MAN + U+200D ZERO WIDTH JOINER + U+1F3ED FACTORY. > > Right, I should have test

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-28 Thread Andrew Tropin
On 2024-06-26 13:46, Maxime Devos wrote: >>> >-Returns the number of characters in the given @var{string}. >>> +Returns the number of bytes in the given @var{string}. >>> >>> This is false. For example, (string-length "πŸ˜€") is 1, whereas in all >>> encodings I know of it is >more than one byte.

Re: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Damien Mattei
and how long for this one? π“„Ώπ“Ž’π“†‘π“‡‹π“…ƒπ“‰”π“‡Œπ“ƒ€π“†“ πŸ˜‚

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Maxime Devos
>No; he wrote é, U+0065 LATIN SMALL LETTER E + U+0301 COMBINING ACUTE ACCENT, >which is two characters unlike Γ©, LATIN SMALL LETTER E WITH ACUTE. > >Likewise πŸ‘¨β€πŸ­ is U+1F468 MAN + U+200D ZERO WIDTH JOINER + U+1F3ED FACTORY. Right, I should have tested that instead of assuming it’s the pre-combined

Re: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Jean Abou Samra
Le mercredi 26 juin 2024 Γ  13:46 +0200, Maxime Devos a Γ©critΒ : > > > > Maybe `the number of codepoints` will work here. > > (string-length "πŸ‘¨β€πŸ­") ;; => 3 > > (string-length "é") ;; => 2>Β  > > The number of characters here is 1 in both cases. > > No, in Unicode (and Guile equates character=Unicod

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Maxime Devos
>ISTR that "Unicode character" is actually synonymous the same than "Unicode code point" -- but the common meaning of "character" is more fuzzy. Perhaps it's wise to avoid that word when trying to be precise. My second point was that it is to late for that, unless you intend to rename procedures

Re: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread tomas
On Wed, Jun 26, 2024 at 01:46:28PM +0200, Maxime Devos wrote: > > >> >-Returns the number of characters in the given @var{string}. > >> +Returns the number of bytes in the given @var{string}. > >> > >> This is false. For example, (string-length "πŸ˜€") is 1, whereas in all > >> encodings I know o

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Maxime Devos
>> >-Returns the number of characters in the given @var{string}. >> +Returns the number of bytes in the given @var{string}. >> >> This is false. For example, (string-length "πŸ˜€") is 1, whereas in all >> encodings I know of it is >more than one byte. Also, R5RS says: [...] > >Maybe `the number o

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-26 Thread Andrew Tropin
On 2024-06-25 13:27, Maxime Devos wrote: > >-Returns the number of characters in the given @var{string}. > +Returns the number of bytes in the given @var{string}. > > This is false. For example, (string-length "πŸ˜€") is 1, whereas in all > encodings I know of it is more than one byte. Also, R5RS

RE: [PATCH 1/3] Make string-length documentation more correct

2024-06-25 Thread Maxime Devos
>-Returns the number of characters in the given @var{string}. +Returns the number of bytes in the given @var{string}. This is false. For example, (string-length "πŸ˜€") is 1, whereas in all encodings I know of it is more than one byte. Also, R5RS says: >procedure: string-length string >Returns th