Skip to content

Commit 8e14f1d

Browse files
committed
Encode output as utf-8 to match file header
1 parent 0d13bd9 commit 8e14f1d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sqlacodegen/codegen.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,8 @@ def render(self, outfile=sys.stdout):
653653

654654
# Render the model tables and classes
655655
for model in self.models:
656-
print('\n\n' + model.render().rstrip('\n'), file=outfile)
656+
print('\n\n', file=outfile)
657+
print(model.render().rstrip('\n').encode('utf-8'), file=outfile)
657658

658659
if self.footer:
659660
print(self.footer, file=outfile)

0 commit comments

Comments
 (0)