On 2024-06-26 14:26, Maxime Devos wrote:
>>No; he wrote eΜ, 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
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.
and how long for this one? πΏπ’πππ
ππππ
π
>No; he wrote eΜ, 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
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 "eΜ") ;; => 2>Β
> > The number of characters here is 1 in both cases.
>
> No, in Unicode (and Guile equates character=Unicod
>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
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
>> >-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
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
>-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
10 matches
Mail list logo