grist-core icon indicating copy to clipboard operation
grist-core copied to clipboard

table name change doesn't renewal in cjk language

Open tendertree opened this issue 2 years ago • 1 comments

I find something confused situation when I change table name by CJK language. they not recognized correctly by ther name. but it is ok when I add some number to identifier

I think it is not critical issue (because it fine if use english only or add some number) but if it would be fixed, it could help for who use data something deal with asian contents

tendertree avatar Mar 07 '22 06:03 tendertree

Hi @tendertree, yes I can see that is confusing. The table identifier is being picked by this method: https://github.com/gristlabs/grist-core/blob/a825115c0444915aeccd1dcf7ac83f893ff27892/sandbox/grist/identifiers.py#L81 It was written to pick an identifier that was safe to use in formulas and databases. With Python3 and Sqlite, I think the method could be made a lot more liberal. Anyway, here is approximately what it is doing today:

  • Stripping out all but alphanumeric characters.
  • If result is empty, construct an id of the form TableN.
  • If result starts with a number, prefix it with T.

We have a "raw data" feature in the works that should make the relationship between Grist table names and ids clearer.

paulfitz avatar Mar 07 '22 14:03 paulfitz