question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cyrillic characters don't work

See original GitHub issue

Regular expressions with cyrillic characters (e.g. [А-Я]{1,5}[а-я]{5,10}) don’t work in the latest version. The last version it used to work in is 0.4.6.

This reproduces the issue: https://codesandbox.io/s/randexp-cyrillic-issue-2kcou

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fentcommented, Apr 7, 2020

I’m leaning towards @michaelficarra in that the default range should be respected for predefined sets, but for custom non-negated sets like in the OP (e.g. [А-Я]{1,5}[а-я]{5,10}), could ignore the default range

0reactions
1valdiscommented, Apr 9, 2020

@michaelficarra if it was restricted by someone to a-f then it was done on purpose. For a-f it can be easily found: letters for hexadecimal numbers. If there goes some y or z then it’s gonna blow up. The regexp itself is not always something you write into code and control. The randexp.js instance however is. I believe explaining that as “the default range of generated characters applies to whole regexp” is also simpler and more consistent than “the default range applies only to ‘open’ sets and negated groups, but not for predefined ranges”. And I don’t understand what’s the problem with one line of code randexp.defaultRange.add(0, 65535); if you want Chinese, Russian and others.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cyrillic Characters Not Rendered Correctly
b) Click the Keyboards and Languages tab, and then click Change keyboards. c) Under Installed services, click Add.
Read more >
How to get Cyrillic characters displayed correctly?
Answer: This tutorial will guide you through the steps of how to get Cyrillic characters displayed correctly if you don't have the Russian...
Read more >
Óñòàíîâêà Fix Russian Application: Show Cyrillic Letters, not ...
Those weird characters /strings. ... Óñòàíîâêà Fix Russian Application: Show Cyrillic Letters, not weird EeIiAaOoUu symbols w/ diacritics.
Read more >
PHP: Cyrillic characters not displayed correctly - Stack Overflow
I've tried encoding/decoding the hardcoded strings from my php file every which way, but couldn't get the characters to display properly. Since ...
Read more >
Cyrillic characters appear as garbage text in the output ...
Cyrillic characters appear as garbage text in the output window for CMake ... The Visual Studio team has determined that this issue is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found