tamasfe / taplo

A TOML toolkit written in Rust
https://taplo.tamasfe.dev
MIT License
1.26k stars 108 forks source link

Does "Even Better TOML" support Unicode-based keys, such as Chinese characters, parentheses, and underscores? #584

Closed liaoliaojun closed 3 months ago

liaoliaojun commented 3 months ago

Hello,

I am using the "Even Better TOML" extension for Visual Studio Code and I have a question regarding its features. I would like to know whether the extension supports Unicode-based characters for keys within the TOML files. Specifically, I am interested in using Chinese characters, parentheses, and underscores in the keys.

For example, I would like to have a TOML file with the following content:

[title_*^)123] 服务器地址 = "localhost" 端口号_8080 = 8080

Could you please confirm if such usage is supported by the "Even Better TOML" extension and if there are any specific settings or versions I should use to ensure compatibility?

Thank you for your assistance and for the great work on the extension!

tamasfe commented 3 months ago

Hi, the extension tries to follow the TOML specification which only allows alphanumeric (and -_) characters. However you may use almost any character if you put the keys in quotes. See here.