Makes sense, since surrogates are a work around that is only needed in utf16

Cheers, bob

> On Nov 28, 2020, at 18:51, bill lam <[email protected]> wrote:
> 
> 9 u: won't process surrogates if its right argument is numeric. You can
> convert it to utf16 first.
>   $9 u:  128512 55357 56832
> 3
> 
>   $ 9 u: 7 u: 128512 55357 56832
> 2
> 
> 
> On Sun, Nov 29, 2020, 10:33 AM 'robert therriault' via Beta <
> [email protected]> wrote:
> 
>> To be fair, I also see this behaviour in j901,j807 and j805, but I first
>> noticed it in j902 (probably because it is incredibly obscure!)
>> 
>>        s:<(9 u:  128512 128512)  NB. expected behaviour
>> `😀😀
>>       s:<(9 u:  55357 56832 55357 56832) NB. expected behaviour
>> `😀😀
>>       s:<(9 u:  128512 55357 56832) NB. does not like mixing surrogate
>> pairs with code point
>> `😀������
>>       s:<(9 u:  55357 56832 128512) NB. likes the reversal even less
>> `=
>>       s:<(9 u:  55357 56832 3101) NB. lower code points do not create a
>> problem when mixed with surrogate pairs
>> `😀ఝ
>>       s:<(9 u:  3101 55357 56832) NB. in either order
>> `ఝ😀
>> 
>> Also noticed that even when forced to unicode4, 5 s: returns a boxed
>> unicode value instead of unicode4 when using surrogate pairs
>> 
>>       5 s: s:< 9 u: 128512
>> ┌──┐
>> │😀│
>> └──┘
>>      datatype > 5 s: s:< 9 u: 128512
>> unicode4
>>      5 s: s:< 9 u: 55357 56832
>> ┌──┐
>> │😀│
>> └──┘
>>      datatype > 5 s: s:< 9 u: 55357 56832
>> unicode
>> 
>> 
>>    JVERSION
>> Engine: j902/j64avx2/darwin
>> Beta-n: commercial/2020-11-21T11:37:53
>> Library: 9.02.08
>> Qt IDE: 1.8.7/5.12.7(5.12.7)
>> Platform: Darwin 64
>> Installer: J902 install
>> InstallPath: /users/bobtherriault/j902
>> Contact: www.jsoftware.com
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to