选择后,VSCODE IDE弄乱了RTL字符串
最近,我不得不在我的机器上重新安装 Windows 11。所以,在那之后,我不得不再次安装VSCode(因此,我有最新版本的VSCode)。
现在,每当我在代码中选择任何波斯语句子(字符串)时,IDE 都会显示一个与正确字符串相差甚远的混乱字符串。我无法在此处将正确和错误的句子显示为文本,因为复制和粘贴会以正确的格式显示结果。因此,我必须将它们作为图像提供。 (提前抱歉给您带来不便)
正确的波斯语句子
不正确的波斯语句子(选择后)
对于不懂的人来说可能有点难以理解熟悉波斯语。通过查看两个图像中 $creatorId
后面的第一个单词就可以理解其中的差异。
如果我们想用阿拉伯语或其他从右到左的语言书写,也可能会发生这种情况。
如果您能提出任何建议来避免这种情况,我们将不胜感激。
Recently, I had to reinstall windows 11 on my machine. So, after that, I had to install VSCode again (therefore, I have the most recent version of VSCode).
Now, whenever I select any Persian sentences (strings) in my code, the IDE shows a messed-up string that is far away from the correct one. I can not show the correct and incorrect sentences as texts here because copying and pasting results in the correct format. Therefore, I have to provide them as images. (Sorry for any inconvenience, in advance)
Correct Persian Sentence
Incorrect Persian Sentence (After selecting)
This might be a little bit tricky to understand for people who are not familiar with the Persian Language. The difference can be understood by looking at the first word after $creatorId
in both images.
This also might happen if we wanted to write in Arabic or other right-to-left languages.
It would be highly appreciated if you could suggest anything to avoid this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
搜索很多后,我在 vScode repository的问题的一个问题上,我找到了适当的答案。问题在于新版本的Vscode呈现Whitespace的方式。因此,要解决此问题,您需要按照以下步骤
怪异的混乱字符串现在被失去了。
请注意,
您还可以使用设置编辑器访问和更改 editor.renderwhitespace 。因此,如果您发现上述步骤令人沮丧,只需使用设置编辑器(您可以使用VSCODE窗口右端的设置图标打开它,甚至可以使用 ctrl + ,< /kbd>)并搜索 editor.renderwhitespace 。然后选择上述三个选项之一。
After searching a lot, I found the proper answer on one of the VScode repository's issues. The problem was with the way the new version of VSCode renders the whitespace. So, to solve this problem, you need to follow the below steps:
The weird messed-up string is disapeared now.
Note
You can also access and change the editor.renderWhitespace using the settings editor. So, if you find the steps mentioned above frustrating, just use the settings editor (you can open it using the setting icon at the right end of the VSCode window or even using CTRL + ,) and search for editor.renderWhitespace. Then choose one of the three above-mentioned options.