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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -