[Bug]: Cyrillic function names are rejected by the formula parser

Open Beginner friendly
#1,803 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
compilers

Research direction

Start in src/parser/parser-consts.ts, where UNICODE_LETTER_PATTERN excludes Cyrillic, and check where the lexer uses that pattern. Reproduce by configuring ruRU and parsing =СУММ(1;2;3), which currently returns #ERROR!. Done when Cyrillic function names such as СУММ and ЕСЛИ parse under ruRU and the existing parser tests still pass.

Written by the indexing model from the issue text.

Description

Description

HyperFormula 3.4.0 fails to parse Russian function names even with the ruRU language registered and configured.

For example, =СУММ(1;2;3) produces #ERROR!:

Parsing error. unexpected character: ->С<- at offset: 1

The cause appears to be UNICODE_LETTER_PATTERN in src/parser/parser-consts.ts, which excludes Cyrillic characters:

export const UNICODE_LETTER_PATTERN = 'A-Za-z\u00C0-\u02AF'

Expected: Russian function names such as СУММ and ЕСЛИ should be recognized when using language: "ruRU".

Suggested fix: Extend the lexer character range to include Cyrillic (\u0400-\u052F).

Video or screenshots

No response

Demo

livecodes.io

HyperFormula version

3.4.0

Your framework

No response

Your environment

Firefox 156.0.1 on Debian 13

Dominant language
TypeScript
Stars
2.8k
Forks
175
Avg merge
2d 7h
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from handsontable/hyperformula

All issues in handsontable/hyperformula

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.