-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C/C++ extension does not work with Unicode identifiers #2034
Comments
UTF-8 characters > 1 byte should work in identifiers now with our latest Insiders release: https://github.com/Microsoft/vscode-cpptools/releases . If you're using VS Code Insiders or have http.proxySupport not set to "off", you might not get the 0.21.0-insiders2 update automatically with C_Cpp.updateChannel set to "Insiders". |
Those colorization bugs would be due to the Atom grammar that is currently used by VS Code to color the file. #230 is on our backlog and should cover this case. |
Or after VS Code supports tree-sitter: microsoft/vscode#50140 . |
I use Unicode identifiers everywhere in my C++ code. It is well supported in Visual Studio. There are some bugs with syntax highlighting for example, but nothing major.
Unfortunately with Visual Studio Code it basically does not work at all. It looks like the problem is caused by the all too common mistake of some code counting in characters interfacing with other code that counts in bytes. Some examples below.
When you bring up the function arguments of a function with a Unicode argument you get a strange "error-type" message.
Note also when the cursor is on
a1
, the othera1
is also highlighted. But when the cursor is ona2
, theÇ
character is highlighted.And note how the color of
ABC
instruct ABC {};
is different from the color ofḀʙÇ
instruct ḀʙÇ {};
Tested on Windows 10, VS Code 1.23.0, C/C++ extension 0.17.3.
The text was updated successfully, but these errors were encountered: