Skip to content

Unknown Unicode Characters #546

@jmanthony3

Description

@jmanthony3

TL;DR: It seems that not all Unicode characters supported for tab-completion are considered as valid symbols by the parser in the Julia REPL.

Goal

In writing a function to model some inelastic deformation of metals, I have found it very helpful to include Unicode characters in my variable names to both keep consistent with equations published in literature and keep variables legible throughout the code. For example, writing two \underbars after a variable connotes a second-rank tensor. Periodically, I have to take the magnitude of a second-rank tensor and use it in other calculations so I write that to a variable.

Error

I would love to use the \Vert ($\Vert$) symbol before and after the variable for a tensor, but the linter in VS Code complains that this is an "unknown unicode character" despite being filled from a tab-completion (see images below). The same messages appear if I attempt to use the \mid ($\mid$) symbol as well.

Tab-Completion:
Image

Linting Error Message:
Image

Image

What I Have Found So Far

It seems from the Julia manual for Unicode Input this character (U+02016 => \Vert = $\Vert$) is supported which I am guessing explains the tab-completion. I also tried creating a variable with the \Vert symbol in a Julia REPL, but I get the same error message for an "unknown unicode character":

Image

It also does not matter that this character is the first symbol in the variable assignment. It persists even if I put a valid character as the first symbol:

Image

Configuration

Julia Version

v1.11.4 (but I also saw this issue on v1.11.3)

VS Code

Version: 1.99.1 (user setup)
Commit: 7c6fdfb0b8f2f675eb0b47f3d95eeca78962565b
Date: 2025-04-04T15:58:59.624Z
Electron: 34.3.2
ElectronBuildId: 11161073
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.22631

Julia VS Code Extension

v1.127.2

Conclusion

That U+02016 maps to \Vert ($\Vert$) in the docs and by tab-completion indicates that there exists some support for this character. But the error messages from the linter for JuliaSyntax.jl and from a ParseError in a Julia REPL indicates that perhaps the parser doesn't fully map all the Unicode characters as valid symbols?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions