Setting the correct encoding when piping stdout in Python -


When python pipes the output of a program, the Python interpreter is confused with encoding Does not set. It means:

  # - * - coding: UTF-8 - * - print and "åäö"  

will work fine when running By the form, but failed with:

Unicode encoding error: 'ASCI' can not encode '\ xa0' in the codec character 0: not in the serial number (128)

When a pipe is used in sequence.

What is the best way to do this while piping? Can I tell it to use the shell / file system / whatever it is using?

The suggestion I have seen so far is to modify your site directly, or to harass default encoding by using this hack:
  # - * - Coding: Is UTF-8 piping a better way of working?    



  

Comments

Popular posts from this blog

sql - Find last match with latest inserted name in table -

c# - XML serialize base class without knowing derived class -

Send innerHTML text in URL in JSP -