[Jprogramming] Unicode parameter in WD function (J504)
bill lam
bbill.lam at gmail.com
Sun Oct 8 15:05:22 HKT 2006
Alex Rufon wrote:
> I couldn't find the definition for ucs2.
>
> I've browsed the Unicode FAQ on this site,
> http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 , and it seems that
> UCS2 is different from UTF8 ... im just curious why use the ucs2 method
> in your example. :)
OT: Have you recovered? Over the past several years nearly all typhoons either
going north to Japan and Taiwan, or going south to Hainan and Vietnam.
unicode in J is ucs2 format. the verb 'ucs2' in
vdata=. ucs2 wd 'olemethod r base executeSQL *', utf8 y.
is also defined in j601 stdlib called 'ucp', in J601
(ucs2=: ) ucp=: 7&u:
utf8=: 8&u:
If you are absolutely sure that only 7-bit ascii characters will ever be
returned, verb ucs2 (ucp) will not be needed.
But there is no such thing as 7&u: or 8&u: in J504, so that you need to roll
your own.
--
regards,
bill
More information about the Programming
mailing list