fixed argument count
Support non-utf8 environment.