replace getUnicode with ucs2 library