Using tomllib with utf8

It’s really a shame that you can’t use UTF-8, which was difficult for them to do like json or configparser. How do I explain to my client that he cannot use his name there. It is a very bad implementation that no one needs or will use, I propose deleting it.

Not sure what issue you are encountering, but it definitely isn’t that UTF-8 isn’t supported by the stdlib tomllib module (it is supported after all). If you want help, you are going to be more specific and please don’t continue this discussion in this necroed thread. What you are saying has little to do with the discussion of the now accepted and finalized PEP.

3 Likes

You need to be clearer about what exactly doesn’t work. Note that the TOML spec mentions that bare keys (that is keys without quotes) need to be ASCII: TOML: English v1.0.0.

That is, this is invalid TOML:

café = "coffee"

Use this instead:

"café" = "coffee"
5 Likes