You may try converting it to wide character first
/:~ucp'qweårtaäasösdf'
aadefqrsstwäåö
or if you want utf8 back
/:~&.ucp'qweårtaäasösdf'
aadefqrsstwäåö
if x is a rank-1 vector of 2 atom, I think it can be (untested)
($y) $ (1{x) (I.(0{x)=,y) } ,y
please also refer to the verb charsub , that amend idiom should be supported by
special code.
Срд, 25 Май 2011, Gian Medri писал(а):
> Hi!
> 1) I have a problem with sorting with the Swedish alphabet that contains 3
> extra letters after z.
> Example:
> /:~'qweårtaäasösdf'
> aadefqrsstw������
>
> Perhaps it depends on the limitation of "a. "?
>
> 2) Often I encounter the necessity to replace element x by element y in an
> array.
> I solved the problem in an APL fashion such as:
> repl=: 4 : '($y)$ (1{x) (((0{x)=,y)#i.*/$y)},y' NB. replace x1 in array y
> by x2
>
> This verb works OK for any array, but I wonder if there is a better J-way
> to do it.
>
> Thanks
> Gian Medri
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm