Re: [racket-users] char-utf-8-length signature is surprising

2018-05-03 Thread David Storrs
Interesting. Thanks for the explanation; that was bugging me. On Thu, May 3, 2018 at 3:37 PM, Shu-Hung You wrote: > Looks like the implementation of char-utf-8-length returns values > fitting the "FSS-UTF (1992) / UTF-8 (1993)" table in >

Re: [racket-users] char-utf-8-length signature is surprising

2018-05-03 Thread Shu-Hung You
Looks like the implementation of char-utf-8-length returns values fitting the "FSS-UTF (1992) / UTF-8 (1993)" table in https://en.wikipedia.org/wiki/UTF-8#History. Not sure what's the standard UTF-8 encoding.. /* racket/src/char.c */ static Scheme_Object *char_utf8_length (int argc, Scheme_Object

[racket-users] char-utf-8-length signature is surprising

2018-05-03 Thread David Storrs
I noticed this in the docs and it surprised me: (char-utf-8-length char) → (integer-in 1 6) UTF-8 characters are 1-4 bytes, so why isn't it (integer-in 1 4)? I feel like this is probably obvious but I'm not coming up with the answer. -- You received this message because you are subscribed to