in jwiki essay/number in words. chinese version for some numbers eg. 10 to 19
and also 122000, 123456 there are extra garbage byte in the beginning.  Because
they are illegal bytes so that j session will not display them. As a test, each
chinese character in bmp has 3 bytes in utf8 so that the number of bytes in
resulting words should be divisible by 3.

   +/ 0 ~: 3&|@#...@zh("0) i.1e6
109000

as a workaround, convert chinese literal into wide character, eg

ZH10=: 7&u:&.> <;._1 ' 零 一 二 三 四 五 六 七 八 九'  NB. i.10

-- 
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

Reply via email to