From: Zachary Ware Date: Wed, 22 Jul 2015 03:50:29 +0000 (-0500) Subject: rstlint: explicitly open files as UTF8 X-Git-Tag: v3.5.0b4~26^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4aa30dc27535bed8ffd16d37f8794d0a06bb0148;p=python rstlint: explicitly open files as UTF8 --- diff --git a/Doc/tools/rstlint.py b/Doc/tools/rstlint.py index be19ec8b37..7dccf72f99 100755 --- a/Doc/tools/rstlint.py +++ b/Doc/tools/rstlint.py @@ -196,7 +196,7 @@ Options: -v verbose (print all checked file names) print('Checking %s...' % fn) try: - with open(fn, 'r') as f: + with open(fn, 'r', encoding='utf-8') as f: lines = list(f) except (IOError, OSError) as err: print('%s: cannot open: %s' % (fn, err))