Jupyter Unicode symbols issue

Hi!
I have a problem with using the Unicode symbols in Jupyter lab. After entering \bbD, \bbO, or any other character with the Unicode starting with “1D” in a Jupyter cell, Jupyter stops to understand any other Unicode characters in this cell. For example, I can enter “α β γ δ 𝐀”, but after this, if I try to enter “α β γ δ 𝐀 \alpha” and press Tab, it throws “BoundsError: attempt to access 23-codeunit String at index [1:24]”, see the picture below.

What can I do with it? The same problem appears for Julia 1.8.3 and Julia 1.8.5. It appears only in the browser version of Jupyter, there are no problems in vs code, but I prefer to work in the browser because it eats less memory in this way and this is critical for me.

1 Like

It works for me in Jupyter. What version of Jupyter are you using?

This sounds an awful lot like a bug that was fixed 5 years ago (because Jupyter was mixing up UTF-16 code units with characters … UTF-16 sucks): Broken tab completion after high Unicode codepoints · Issue #541 · JuliaLang/IJulia.jl · GitHub … I hope they haven’t regressed?

I have version 3.5.2.

This is an ancient version (the current release is 6.5.x). Upgrade, and the problem should go away.

Update: Oh, I see that you are referring to JupyterLab, not Jupyter. My mistake. Maybe they forgot to fix the problem in JupyterLab?

It works in Jupyter-notebook 6.5.2, but not in Jupyter-lab 3.6.1 (which seems to be the latest). It is irritating, but the notebook suits me well too, thank you very much!

Can you not update Jupyter-lab?

I have already updated it, if you wish, I can try to downgrade it to another version, which one?

Please file an issue with jupyterlab, and reference the corresponding issue jupyter/jupyter_client#259 that was fixed with Jupyter. I’ve filed incorrect cursor_pos for completion requests with non-BMP Unicode characters · Issue #13961 · jupyterlab/jupyterlab · GitHub

Actually, hang on, it might be IJulia’s fault if it is mis-identifying the protocol version here. Let me check it. Nope, it definitely looks like the same old bug in JupyterLab — if I force IJulia to use the old buggy UTF-16 protocol by changing VersionNumber(m.header["version"]) ≥ v"5.2" to false, then it works in JupyterLab (but not in Jupyter).

3 Likes

Thanks!