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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -