fix nodejs api bug about multi-bytes character