Add encode_opt() to choose native or escaped utf8 code
Merge pull request #1 from kuenishi/native-utf8-squashed

Add encode_opt() to choose native or escaped utf8 code