ink
ink copied to clipboard
Chinese character support in identifiers. [Request]
Issue description: Can't use Chinese characters in identifiers. I request support for Simplified/Traditional Chinese. Related issue: Non-ASCII characters can't be part of knot and variable names? #225
I'm using inkgd for my Godot RPG-like visual novel. I'm currently using two sets of naming:
- Our game designer/ writer named all "events" in Chinese.
- All Ink knots are named in ASC-II characters, sometimes Chinese Pinyin, sometimes English abbreviations. (bad practice i know.)
An "event" is like an act in drama, but with tons of different trigger conditions and value operations. All these data is stored in YAML files. In YAML files, every event has an "ink_knot" key to identify which knot to go to; In Ink files, we use comments to identify which "event" a knot belongs to.
This way of implementation is OK, but it's a little inconvenient and messy. We had to name things twice. Support for Chinese will make things a lot smoother.
Unicode ranges can be found here - CJK Unified Ideographs.
Actually, it's hard to support Chinese characters only. Since all Chinese, Japanese, Korean, Vietnamese ideographs are all in the same ranges, and they share a a lot of characters.
Supporting Simplified Chinese is completely the same as supporting Traditional Chinese. I'm not sure about other CJK language because they have different symbols and punctuation at different Unicode ranges. I wouldn't say it's a full support if symbols are ignored.
As for Chinese, I think 、
(U+3001),
(u+FF0C) should be considered, as underscores looks bad with Chinese.
事件_芜湖起飞_1 事件,芜湖起飞,1
In fact, most Chinese IMEs overwrites the behavior of _
key by default. They will input "——" (破折号) when you press Shift
+-
. 破折号 is kinda like em dash, but not the same. Anyway, it's not an insignificant symbol. You can toggle this behavior in IME settings, but it's essentially inconvenient.
Thank you for all your work.