scan: Fix a utf-8 bug for string length