reuse tokenize.detect_encoding in linecache instead of a custom solution

patch by Victor Stinner #4016
2 files changed