summaryrefslogtreecommitdiff
path: root/pygments/lexers/_sourcemod_builtins.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/_sourcemod_builtins.py')
-rw-r--r--pygments/lexers/_sourcemod_builtins.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/_sourcemod_builtins.py b/pygments/lexers/_sourcemod_builtins.py
index 6f1392dc..edafb1f0 100644
--- a/pygments/lexers/_sourcemod_builtins.py
+++ b/pygments/lexers/_sourcemod_builtins.py
@@ -1122,14 +1122,14 @@ if __name__ == '__main__': # pragma: no cover
return functions
def regenerate(filename, natives):
- with open(filename) as fp:
+ with open(filename, encoding='utf-8') as fp:
content = fp.read()
header = content[:content.find('FUNCTIONS = (')]
footer = content[content.find("if __name__ == '__main__':")-1:]
- with open(filename, 'w') as fp:
+ with open(filename, 'w', encoding='utf-8') as fp:
fp.write(header)
fp.write(format_lines('FUNCTIONS', natives))
fp.write('\n\n' + footer)