Allowing for UTF-8 characters in Python source code

By default, Python cannot deal with non-ASCII characters in source files, such as the following line:

The file encoding can be signalized by adding a magic comment in either the first or second line of the file:

 References

  • [1] More information in the Python Enhancement Proposals index

Leave a Reply

Your email address will not be published. Required fields are marked *

Please type the characters of this captcha image in the input box

Please type the characters of this captcha image in the input box