\mscr unicode character display in REPL with Windows


#1

Hi, I have been enjoying some of the many Unicode characters available in Julia (https://docs.julialang.org/en/stable/manual/unicode-input/), however, found that some of them do not display in the REPL in Windows. Specifically found the issue with some of the \mscr & \mit characters.

Note I have been using vscode as my editor with Julia 0.6.2.

Example:

  1. “\mscrI” displays as ℐ in both the editor and ℐ the REPL.
  2. “\mscrP” displays as 𝒫 in the editor but as � in the REPL
  3. “\mitP” displays as 𝑃 in the editor and as � in the REPL

It is curious that some work and others do not (example 1 is fine). These are just some that I came across.

In addition, the characters display fine in the terminal (if you paste from the editor) after installing and applying the DejaVu fonts family, but still fail to show correctly in the Julia REPL. I have also tried the same using the ConEmu console emulator and get the same results (characters display fine in terminal but show up as � in REPL).

The problem seems to be Windows related since I tried example 2 with Ubuntu and the character displayed fine in the REPL.

Is this a known issue? any thoughts would be appreciated, thanks.


#2

Seems like you might need to switch to fonts that have these characters.


#3

For the Julia and JuliaPro installations on windows, is there any way to create the shortcut to the console to use a font with better unicode support? This would make it a lot easier for users, since changing fonts is not something most windows users know how to do. Installing an appropriate font would also be very nice as well.


#4

A longstanding issue has been the desire to ship Julia with a better console on Windows: https://github.com/JuliaLang/julia/issues/7267https://github.com/JuliaLang/julia/pull/12879 ran into some technical issues, but maybe the situation has improved?


#5

Minnty or Cmder or something would be nice, but low priority compared to other enhancements to the Julia environment. But just changing the font to a more unicode friendly one would be an improvement as a stop-gap.


#6

Thanks for the replies!

Very likely I am missing something but I did install the DejaVu font family and set the terminal to use that. In addition I tried the example with ConEmu with UTF-8 encoding with the same result. Because the character displays correctly in the terminal when pasted but not when pasted in Julia REPL led me to believe that it is not a problem with the font itself.

Please see the image below:

image

I get the same result with Powershell using the DejaVu font family.

I have not tried Minnty or Cmder, that will be my next test.


#7

I can replicate this is both Juno and VSCode. Both have DejaVu Sans Mono set as the font in both the editor and console. \mscrP displays fine in the editor, but not in the console, nor in the REPL. In all cases, Julia is running in PowerShell on Windows 10.

println("𝒜, ℬ, 𝒞, 𝒟, ℰ, ℱ, 𝒢, ℋ, ℐ, 𝒥, 𝒦, ℒ, ℳ, 𝒩, 𝒪, 𝒫, 𝒬, ℛ, 𝒮, 𝒯, 𝒰, 𝒱, 𝒲, 𝒳, 𝒴, 𝒵")

yields �, ℬ, �, �, ℰ, ℱ, �, ℋ, ℐ, �, �, ℒ, ℳ, �, �, �, �, ℛ, �, �, �, �, �, �, �, �


#8

an update:

I have tried with Cmder & Mintty. Cmder also do not display all the fonts correctly (fonts based on Conemu I believe). The fonts do work by installing Cygwin & Mintty. However, it does not seem to be possible to use Mintty as an integrated terminal within VScode (only an external terminal).

As has been motioned in previous posts, the font displays correctly in the editor (or if you paste it somewhere else e.g. notepad) but not in the Julia REPL. This is only a problem in Windows.