# \\mscr unicode character display in REPL with Windows

**URL:** <https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290>\
**Category:** General Usage\
**Created:** [April 11, 2018, 8:43pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290 "2018-04-11T20:43:38Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![waldoc](https://avatars.discourse-cdn.com/v4/letter/w/ce7236/32.png) [@waldoc](https://discourse.julialang.org/u/waldoc)\
**Post date:** [April 11, 2018, 8:43pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/1 "2018-04-11T20:43:38Z")

</div>

Hi, I have been enjoying some of the many Unicode characters available in Julia ([https://docs.julialang.org/en/stable/manual/unicode-input/](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.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [April 11, 2018, 8:57pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/2 "2018-04-11T20:57:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [April 11, 2018, 9:02pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/3 "2018-04-11T21:02:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [April 11, 2018, 9:34pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/4 "2018-04-11T21:34:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [April 11, 2018, 9:43pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/5 "2018-04-11T21:43:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![waldoc](https://avatars.discourse-cdn.com/v4/letter/w/ce7236/32.png) [@waldoc](https://discourse.julialang.org/u/waldoc)\
**Post date:** [April 12, 2018, 11:56am UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/6 "2018-04-12T11:56:36Z")

</div>

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](https://global.discourse-cdn.com/julialang/original/3X/5/3/5393328a3b2d76fb5dd9e8d6774178150b2e76d8.png)

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.

---

<div class="post-metadata">

**Author:** ![braamvandyk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/braamvandyk/32/5086_2.png) [@braamvandyk](https://discourse.julialang.org/u/braamvandyk)\
**Post date:** [May 5, 2018, 3:32pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/7 "2018-05-05T15:32:27Z")

</div>

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 �, ℬ, �, �, ℰ, ℱ, �, ℋ, ℐ, �, �, ℒ, ℳ, �, �, �, �, ℛ, �, �, �, �, �, �, �, �

---

<div class="post-metadata">

**Author:** ![waldoc](https://avatars.discourse-cdn.com/v4/letter/w/ce7236/32.png) [@waldoc](https://discourse.julialang.org/u/waldoc)\
**Post date:** [May 18, 2018, 7:15pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/8 "2018-05-18T19:15:34Z")

</div>

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).

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/c/ec6960c09037af197cfde88efdbf8f5efbd7d8ae.png)

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.

---

<div class="post-metadata">

**Author:** ![NiclasMattsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/niclasmattsson/32/21988_2.png) [@NiclasMattsson](https://discourse.julialang.org/u/NiclasMattsson)\
**Post date:** [September 30, 2018, 10:23pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/9 "2018-09-30T22:23:44Z")

</div>

> [@braamvandyk](#):
>
> 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 �, ℬ, �, �, ℰ, ℱ, �, ℋ, ℐ, �, �, ℒ, ℳ, �, �, �, �, ℛ, �, �, �, �, �, �, �, �

I think this is neither a Julia nor even a Windows problem. I think what Stefan said near the top is correct: these characters are simply missing in the font you’re using. My guess is that you only see them in your editor because it tries to be helpful and replaces missing characters with glyphs from some other font.

I think something similar is going on in the Markdown rendering as well. Look carefully at the `println()` statement above: the characters for B, E, F, H etc. are styled differently than A, C, D, G etc., and are clearly from a different font.

We can get a clue as to why these particular characters behave differently from a few lines of Julia:

```julia
julia> s = "𝒜, ℬ, 𝒞, 𝒟, ℰ, ℱ, 𝒢, ℋ, ℐ, 𝒥, 𝒦, ℒ, ℳ, 𝒩, 𝒪, 𝒫, 𝒬, ℛ, 𝒮, 𝒯, 𝒰, 𝒱, 𝒲, 𝒳, 𝒴, 𝒵";

julia> for i in eachindex(s)
         (s[i]==',' || s[i]==' ') && continue
         display(s[i])
       end
'𝒜': Unicode U+01d49c (category Lu: Letter, uppercase)
'ℬ': Unicode U+212c (category Lu: Letter, uppercase)
'𝒞': Unicode U+01d49e (category Lu: Letter, uppercase)
'𝒟': Unicode U+01d49f (category Lu: Letter, uppercase)
'ℰ': Unicode U+2130 (category Lu: Letter, uppercase)
'ℱ': Unicode U+2131 (category Lu: Letter, uppercase)
'𝒢': Unicode U+01d4a2 (category Lu: Letter, uppercase)
'ℋ': Unicode U+210b (category Lu: Letter, uppercase)
'ℐ': Unicode U+2110 (category Lu: Letter, uppercase)
'𝒥': Unicode U+01d4a5 (category Lu: Letter, uppercase)
'𝒦': Unicode U+01d4a6 (category Lu: Letter, uppercase)
'ℒ': Unicode U+2112 (category Lu: Letter, uppercase)
'ℳ': Unicode U+2133 (category Lu: Letter, uppercase)
'𝒩': Unicode U+01d4a9 (category Lu: Letter, uppercase)
'𝒪': Unicode U+01d4aa (category Lu: Letter, uppercase)
'𝒫': Unicode U+01d4ab (category Lu: Letter, uppercase)
'𝒬': Unicode U+01d4ac (category Lu: Letter, uppercase)
'ℛ': Unicode U+211b (category Lu: Letter, uppercase)
'𝒮': Unicode U+01d4ae (category Lu: Letter, uppercase)
'𝒯': Unicode U+01d4af (category Lu: Letter, uppercase)
'𝒰': Unicode U+01d4b0 (category Lu: Letter, uppercase)
'𝒱': Unicode U+01d4b1 (category Lu: Letter, uppercase)
'𝒲': Unicode U+01d4b2 (category Lu: Letter, uppercase)
'𝒳': Unicode U+01d4b3 (category Lu: Letter, uppercase)
'𝒴': Unicode U+01d4b4 (category Lu: Letter, uppercase)
'𝒵': Unicode U+01d4b5 (category Lu: Letter, uppercase)

```

The reason is that there are two completely different regions of Unicode involved here. I have no idea why related characters are so jumbled in Unicode.

EDIT: Also, Markdown’s syntax highlighting for Julia renders the characters in the lower Unicode region in red. So weird.

I suspect that the only way to solve this is to keep looking for a font that supports all these characters. Or maybe build your own chimera font by copying glyphs from fonts that support different regions?

---

<div class="post-metadata">

**Author:** ![braamvandyk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/braamvandyk/32/5086_2.png) [@braamvandyk](https://discourse.julialang.org/u/braamvandyk)\
**Post date:** [October 1, 2018, 6:21am UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/10 "2018-10-01T06:21:52Z")

</div>

There is a career at CSI waiting for you… 👍

---

<div class="post-metadata">

**Author:** ![braamvandyk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/braamvandyk/32/5086_2.png) [@braamvandyk](https://discourse.julialang.org/u/braamvandyk)\
**Post date:** [October 7, 2018, 5:26pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/11 "2018-10-07T17:26:36Z")

</div>

OK, back from holiday, so I had time to run a little test. Turns out it is a bit deeper. If I run Julia inside Git Bash, with the **same font** , all of `\scrA` to `\scrZ` actually display just fine. Running Julia inside PowerShell or the Windows console still displays placeholders instead, even though the characters display just fine in Atom. Git bash (mintty) is set to use UTF-8, which - to my knowledge - the Windows console does not handle properly.

---

<div class="post-metadata">

**Author:** ![tchr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tchr/32/15138_2.png) [@tchr](https://discourse.julialang.org/u/tchr)\
**Post date:** [March 27, 2019, 2:11pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/12 "2019-03-27T14:11:39Z")

</div>

> [@NiclasMattsson](#):
>
> The reason is that there are two completely different regions of Unicode involved here. I have no idea why related characters are so jumbled in Unicode.

Bit late to the game, but this seems to basically be the explanation: [utf 8 - Why are there holes in the Unicode table? - Stack Overflow](https://stackoverflow.com/questions/47206070/why-are-there-holes-in-the-unicode-table) (for whatever reason, probably popularity and demand, the `U+21...` characters were added before the `U+01d4...` set, and were then left out when the `U+01d4...` set was introduced to avoid duplicated characters and preserve backward compatibility).

The table is full of such reserved and “empty” spots, apparently: [https://unicode-table.com/en/blocks/mathematical-alphanumeric-symbols/](https://unicode-table.com/en/blocks/mathematical-alphanumeric-symbols/)

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 28, 2019, 8:13pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/13 "2019-08-28T20:13:30Z")

</div>

> [@braamvandyk](#):
>
> OK, back from holiday, so I had time to run a little test. Turns out it is a bit deeper. If I run Julia inside Git Bash, with the **same font** , all of `\scrA` to `\scrZ` actually display just fine. Running Julia inside PowerShell or the Windows console still displays placeholders instead, even though the characters display just fine in Atom. Git bash (mintty) is set to use UTF-8, which - to my knowledge - the Windows console does not handle properly.

Sorry to resurrect an old thread, but I wanted to note that there is a simple explanation for this puzzle: when a glyph is not present for a character in a given font, decent text-rendering software switches to a [“fallback” font](https://en.wikipedia.org/wiki/Fallback_font) to find a glyph for that character. Mintty (used by git bash) supports fallback fonts, but the Windows console [does not](https://github.com/JuliaLang/julia/issues/7267#issuecomment-478262752). So, probably your font does _not_ have the `\scrA` character, but Mintty switches to a fallback font whereas the Windows console gives up. This has nothing to do with UTF-8.

---

<div class="post-metadata">

**Author:** ![braamvandyk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/braamvandyk/32/5086_2.png) [@braamvandyk](https://discourse.julialang.org/u/braamvandyk)\
**Post date:** [August 28, 2019, 8:50pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/14 "2019-08-28T20:50:41Z")

</div>

Thanks. I guess that’s all she wrote then, until the Windows console catches a wake-up.

---

<div class="post-metadata">

**Author:** ![Mattriks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mattriks/32/351_2.png) [@Mattriks](https://discourse.julialang.org/u/Mattriks)\
**Post date:** [August 28, 2019, 10:15pm UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/15 "2019-08-28T22:15:28Z")

</div>

> [@Windows terminal announcement](https://discourse.julialang.org/t/windows-terminal-announcement/23929):
>
> The Windows Terminal uses a GPU accelerated DirectWrite/DirectX-based text rendering engine. This new text rendering engine will display text characters, glyphs, and symbols present within fonts on your PC, including CJK ideograms, emoji, powerline symbols, icons, programming ligatures, etc. This engine also renders text much faster than the previous Console’s GDI engine! this can be a huge step for windows REPL julia sessions, what do you think? code: [GitHub - microsoft/terminal: The new …](https://github.com/Microsoft/Terminal)

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [August 29, 2019, 4:00am UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/16 "2019-08-29T04:00:30Z")

</div>

Note though that currently julia (or rather the julia fork of libuv) does _not_ play nicely with the new Windows Terminal. Details are [here](https://github.com/JuliaLang/julia/issues/31491), but the short version is that julia currently is not using the right way to interact with the console on Windows to utilize the features now supported in Windows Terminal.

---

<div class="post-metadata">

**Author:** ![islent](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/islent/32/11326_2.png) [@islent](https://discourse.julialang.org/u/islent)\
**Post date:** [December 2, 2019, 3:43am UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/17 "2019-12-02T03:43:37Z")

</div>

It works with git-bash! That’s enough to me

 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/4/94272c76d86b61951e2e44629d1b48b1efe23b68.png)

---

<div class="post-metadata">

**Author:** ![zwwi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zwwi/32/11932_2.png) [@zwwi](https://discourse.julialang.org/u/zwwi)\
**Post date:** [March 17, 2020, 6:36am UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/18 "2020-03-17T06:36:02Z")

</div>

It also works with wsl in windows terminal.

---

<div class="post-metadata">

**Author:** ![maaf](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@maaf](https://discourse.julialang.org/u/maaf)\
**Post date:** [December 22, 2021, 1:54am UTC](https://discourse.julialang.org/t/mscr-unicode-character-display-in-repl-with-windows/10290/19 "2021-12-22T01:54:14Z")

</div>

Sorry to resurrect an old thread, but I found a way to automate running Julia in Mintty with one click in Windows 7. I hope this will be useful for other readers in this thread.  
Basically I created a batch file with two lines and saved it to the desktop. This batch file does the following:  
1 - It adds Julia and Mintty to the path local to this batch file (first line);  
2 - It calls mintty passing julia as a command that should be executed by mintty (second line).

Example of a batch file created to open Julia 1.6.2 in Mintty (file julia\_1\_6\_2.bat, saved in the desktop):

> ```
> path=%path%;C:\Users\User1\AppData\Local\Programs\Julia-1.6.2\bin;C:\Program Files\Git\usr\bin;
> mintty -h -e julia
> 
> ```

By some strange reason, if mintty and julia are not in the path (first line in the batch file above), julia crashes.
