June Kim wrote:
> 1. I usually never handle other kinds of high-bit characters other
> than Hangul. So I can easily test(if value > 128) if it's Hangul or
> others.
If you only need to work with hangul codepage, I think you may convert unicode
to hangul multibyte data. Do ": then convert back to unicode. Assuming each
hangual multibyte character is 2 bytes (same as chinese or japanese) it should
align neatly.
NB. =========================================================
u2m=: 4 : 0
r=. (>{.rc){.>_4{rc=. 'kernel32 WideCharToMultiByte i i i *w i *c i i i'&cd x ;
0 ; (, y) ; n ; (, n3#' ') ; (n3=. 4*n=. #y) ; 0 ; 0
)
m2u=: 4 :0
r=. (>{.rc){.>_2{rc=. 'kernel32 MultiByteToWideChar i i i *c i *w i'&cd x ; 0 ;
(, y) ; n ; (, n#u:' ') ; n=. #y
)
]a=: 2 2$'李小龍 bruce lee' ; '成龍 jacky chan' ; '王菲 faye wong' ; '鄧麗君
teresa tang'
+-------------------+---------------------+
|李小龍 bruce lee|成龍 jacky chan |
+-------------------+---------------------+
|王菲 faye wong |鄧麗君 teresa tang|
+-------------------+---------------------+
utf8@(950&m2u)"1 ": (950&u2m)@ucp&.> a
+----------------+------------------+
|李小龍 bruce lee|成龍 jacky chan |
+----------------+------------------+
|王菲 faye wong |鄧麗君 teresa tang|
+----------------+------------------+
--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm