Skip Montanaro wrote:
>> Python uses the 7-bit ASCII character set for program text and string >> literals. 8-bit characters may be used in string literals and >> comments but their interpretation is platform dependent; the proper >> way to insert 8-bit characters in string literals is by using octal >> or hexadecimal escape sequences. mal> It's a fact of life that users don't read reference manuals, but mal> simply write programs and feel good if they happen to work :-)
Perhaps a warning should be emitted by the compiler if a plain string literal is found that contains 8-bit characters. Better yet, perhaps Neal can add this to PyChecker if he hasn't already...
See the PEP: this is what phase 1 will do; phase 2 won't accept such a file without an explicit encoding declaration.
-- Marc-Andre Lemburg CEO eGenix.com Software GmbH