Skip to content

Support Unicode/CJK character identifiers in character declarations #8

Description

@Keduoli03

Currently, character identifiers only support English/ASCII names.

For example, this works correctly:

character king
  name: 路易斯

king: 很久很久以前,有只巨龙从遥远的西方飞来,抢掠金银珠宝

choice
  前去征讨
    king: 现在吗?
    choice
      现在
        king: 祝你好运!
      稍后
        king: 没事,多做准备总是好的!

king: 我在王国敬候佳音.

But if I change:

character king

to:

character 国王

and replace all king: with 国王: the parser throws an error.:Unexpected character: 国 at (1:11:10:0)

I hope character declarations can support Unicode/CJK identifiers.

For non-English users, mixing English IDs with localized names becomes confusing in larger scripts. Since dialogue content already supports Chinese correctly, it would be great if character identifiers could also support Unicode characters.

One reason I really like Loreline is that its syntax feels very natural and readable, similar to Python. Supporting Unicode identifiers would make the writing experience even more natural for non-English creators.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions