[issue6240] API to get source encoding as defined by PEP 263

2009-06-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: Already done. tokenize.detect_encoding() -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker ___ __

[issue6240] API to get source encoding as defined by PEP 263

2009-06-08 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar : It'd be nice to get the encoding used by a specific Python file. Considering that 'print' uses sys.stdout.encoding which is always set to None when the Python process is run by subprocess, knowing the source encoding is absolutely necessary in decoding the