Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure all files written by AiiDA and plugins are utf8 encoded (#2107)
* Changed all open for `io.open` and specified UTF8 encoding * Convert explicitly set byte strings to unicode when writing * `json.dumps` doesn't always produce a unicode string (e.g. Python 2 with a bytestring as input), therefore we use `six.text_type` to convert it to unicode and pass it to `io.open(demofile.txt, w, encoding='utf-8')` which expects a unicode object and then it encodes it utf-8. * Set literal strings as unicode * Add encoding option to YAML to ensure that `yaml.dump` returns a bytes object in both Py2 and 3 * Add `json.py` helper function to replace system json * Replace json imports with `from aiida.utils import json`
- Loading branch information
1 parent
9bc4e36
commit 552c626
Showing
76 changed files
with
2,188 additions
and
2,733 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.