10

vscode after update (November 2021 (version 1.63)) Unicode highlighting#

vscode highlight same persian words, I want add persian characters to allowed characters. but how?

Thank you if you can help me

"The character U+0647 "ه" could be confused with the character U+006f "o", which is more common in source code."

rioV8
  • 24,506
  • 3
  • 32
  • 49
Mahdi Sheibak
  • 620
  • 1
  • 4
  • 13

2 Answers2

16

In the Editor > Unicode Highlight: Allowed Characters setting if you click on

Add Item you can paste or type your character in - but it appears you have to do it one by one which is sub-optimal. I tried inputting some unicode ranges but nothing worked.

I tested it for your ه character and it works. Once you paste it in, the value field will populate with true which is what you want.

The Ambiguous Characters setting shouldn't flag characters "common in the current user locale." Is ه such a character?


I don't see a Persian Language Pack in the Marketplace so perhaps there is no way to change your vscode language to Persian.

More on locales here: https://code.visualstudio.com/docs/getstarted/locales

Mark
  • 143,421
  • 24
  • 428
  • 436
11

You can also uncheck Settings > Editor > Unicode Highlight: Ambiguous Characters

It's so much easier than adding characters every single time.

SMB H
  • 121
  • 6
  • +1. The "Ambiguous Characters" feature is fundamentally broken, for example it marks all cyrillic `с`, `о`, `Н` and many other characters as "ambiguous". – rustyx Sep 25 '22 at 12:28