'Why to_json defaults to force_ascii=True

Is there a reason why to_json has default value force_ascii=True?

This option escapes all "non-ascii" characters, thus increasing the size of the output JSON file.

For languages containing only "some" non-ascii characters, this might not be a big deal, but for other languages, like Chinese or Arabic, with "all" their characters being non-ascii, the file size difference can be non-negligible.

I think it made sense to escape non-ascii characters years ago, when Unicode was not widely adopted as default encoding. But nowadays I think this is no longer necessary.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source