Hangul resyllabification by hallvabo

while 1:U=unichr;u,v=map(ord,raw_input().decode('u8'));c=(u-16)%28;print(U(u-c)+U(v+(c+c/23-21,c/2+c/8-11)[c<9]*588)).encode('u8')

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top