perl Encode::_utf8_off in python -
what python's equivalent function of perl's encode::_utf8_off
?
you should never ever use encode::_utf8_off
.
you trying encode string using utf-8. in perl, you'd use of following:
utf8::encode($s);
utf8::encode( $utf8 = $uni );
use encode qw( encode_utf8 ); $utf8 = encode_utf8($uni);
use encode qw( encode ); $utf8 = encode('utf-8', $uni);
i don't know python, quick search finds
utf8 = uni.encode('utf-8', 'strict')
Comments
Post a Comment