We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I name my file as 测试.md in wiki and run markdoc build, there will be an exception:
测试.md
markdoc build
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 3: ordinal not in range(128)
Full exception can be find here http://pastie.org/2979381
The text was updated successfully, but these errors were encountered:
OK, the title should be change to: use unicode instead of str in the whole project.
unicode
str
I tried to fix this issue but found that I need to convert so many str to unicode using str.unicode().
str.unicode()
Sorry, something went wrong.
The right fix, super simple right? :-)
diff --git a/src/markdoc/config.py b/src/markdoc/config.py index 1a64633..722ac4f 100644 --- a/src/markdoc/config.py +++ b/src/markdoc/config.py @@ -64,8 +64,8 @@ class Config(dict): def __init__(self, config_file, config): super(Config, self).__init__(flatten(config)) - self['meta.config-file'] = config_file - self['meta.root'] = p.dirname(config_file) + self['meta.config-file'] = config_file.decode('utf-8') + self['meta.root'] = p.dirname(config_file).decode('utf-8') def __getitem__(self, key): try:
No branches or pull requests
When I name my file as
测试.md
in wiki and runmarkdoc build
, there will be an exception:UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 3: ordinal not in range(128)
Full exception can be find here http://pastie.org/2979381
The text was updated successfully, but these errors were encountered: