Skip to content

Commit

Permalink
Add option to not convert to ascii when saving schema to file (#229)
Browse files Browse the repository at this point in the history
Default behavior is not changed
  • Loading branch information
pajachiet authored and roll committed Mar 25, 2019
1 parent add63ae commit 277ffa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tableschema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def commit(self, strict=None):
self.__build()
return True

def save(self, target):
def save(self, target, ensure_ascii=True):
"""https://github.com/frictionlessdata/tableschema-py#schema
"""
mode = 'w'
Expand All @@ -224,7 +224,7 @@ def save(self, target):
encoding = None
helpers.ensure_dir(target)
with io.open(target, mode=mode, encoding=encoding) as file:
json.dump(self.__current_descriptor, file, indent=4)
json.dump(self.__current_descriptor, file, indent=4, ensure_ascii=ensure_ascii)

# Internal

Expand Down

0 comments on commit 277ffa9

Please sign in to comment.