Fix problem caused by byte range:
in situations like encode(141, "xxx", msg), bt2Str will raise exception since the code tries Character.toChars(-115)...