-- handler to conver decimal to unicode character
on dec2uTxt from i
if i < 0 or i > 65535 then return "error01"
tell "0123456789ABCDEF" to set hexCode to item (i div 4096 + 1) & item (i div 256 mod 16 + 1) & item (i mod 256 div 16 + 1) & item (i mod 256 mod 16 + 1)
run script ("《data utxt" & hexCode & "》 as Unicode text")
end dec2uTxt
-- handler to conver decimal to unicode character
on dec2uTxt from i
do shell script "perl -e 'use utf8; print chr(" & i & ")'" as Unicode text
end dec2uTxt