TextShine icon indicating copy to clipboard operation
TextShine copied to clipboard

Some Change Case actions don't work with Russian letters

Open artemgur opened this issue 3 years ago • 2 comments

Sentence Case, Title Case and Camel Case don't work with Russian letters. At the same time, Upper Case, Lower Case, Snake Case and Random Case work correctly.

Some random text on Russian from Wikipedia for testing and debugging:

В 1991 году во время обучения в Хельсинкском университете Линус Торвальдс заинтересовался операционными системами и был разочарован лицензией MINIX, которая ограничивала её использование только образовательными целями (что исключало любое коммерческое использование), вследствие чего начал работать над своей собственной операционной системой, которая в итоге стала Linux.

artemgur avatar Feb 09 '22 13:02 artemgur

The issue at play here is that the case types that don't work are using regular expressions under the hood for finding lowercase and uppercase letters. These regular expressions are currently coded for English ([a-zA-Z]). If I were to keep the regular expressions in place in the code, how would you express the range of lowercase letters and uppercase letters in Russian?

phase1geo avatar Feb 09 '22 15:02 phase1geo

[А-ЯЁ] for uppercase letters [а-яё] for lowercase letters

artemgur avatar Feb 09 '22 18:02 artemgur