Support non-ascii encoding