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
First, Thank you for the excellent toml paser. I have a problem here When I parse the toml
[测试] url = "test"
I got an error: toml.decoder.TomlDecodeError: Invalid group name '测试'. Try quoting it.
I read the decoder.py, I find the constraints of the group name here
_groupname_re = re.compile(r'^[A-Za-z0-9_-]+$')
I don't know why constraints here. If I modify it to
_groupname_re = re.compile(r'^.*?$')
Everything is ok.
So, is it a bug or the special design.
The text was updated successfully, but these errors were encountered:
As of v0.5 of the TOML standard, which the toml module conforms to: bare keys, like unquoted table names, "may only contain ASCII letters, ASCII digits, underscores, and dashes," so what you're seeing is intentional behavior. It's not special; it's standard.
toml
So, like the error message said, try quoting it. toml does parse this:
["测试"] url = "test"
There is action being taken in the standard to allow more Unicode characters in bare keys, including Chinese text. But that will take some time.
Sorry, something went wrong.
Thank u for reply, I didn't see the standard of toml before. Thank u
No branches or pull requests
First, Thank you for the excellent toml paser.
I have a problem here
When I parse the toml
I got an error:
toml.decoder.TomlDecodeError: Invalid group name '测试'. Try quoting it.
I read the decoder.py, I find the constraints of the group name here
I don't know why constraints here. If I modify it to
Everything is ok.
So, is it a bug or the special design.
The text was updated successfully, but these errors were encountered: