summaryrefslogtreecommitdiff
path: root/pygments/unistring.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/unistring.py')
-rw-r--r--pygments/unistring.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/unistring.py b/pygments/unistring.py
index 2e3c8086..84a11f03 100644
--- a/pygments/unistring.py
+++ b/pygments/unistring.py
@@ -112,7 +112,7 @@ if __name__ == '__main__': # pragma: no cover
categories = {'xid_start': [], 'xid_continue': []}
- with open(__file__) as fp:
+ with open(__file__, encoding='utf-8') as fp:
content = fp.read()
header = content[:content.find('Cc =')]
@@ -136,7 +136,7 @@ if __name__ == '__main__': # pragma: no cover
if ('a' + c).isidentifier():
categories['xid_continue'].append(c)
- with open(__file__, 'w') as fp:
+ with open(__file__, 'w', encoding='utf-8') as fp:
fp.write(header)
for cat in sorted(categories):