Terminal: Unicode characters not rendering properly via WSL

Created on 10 Nov 2018  路  3Comments  路  Source: microsoft/terminal

  • Your Windows build number: 10.0.18277.1000

  • What you're doing and what's happening:
    Attempting to view the contents of a UTF-8 file via WSL does not show the contents of the file.

  1. Create a new file on Linux with UTF-8 characters, such as: 鍥介殯
  2. Within WSL, attempt view file using vi. Question mark characters will be shown instead.
  • What's wrong / what should be happening instead:

When using vi, expecting to see 鍥介殯. Note this problem reproduces with a local file to WSL as well as over an ssh connection. Characters show properly when using PuTTy.

Area-Rendering Product-Conhost Resolution-Duplicate

Most helpful comment

Same behavior in WSL and PowerShell.

image

This is most likely caused by a combination of the following:

  1. The glyph for the characters in question likely not available in the currently selected font (Consolas)
  2. Because Console uses GDI to render text, and since GDI does not support font-fallback (a mechanism for dynamically finding and loading a font that does contain the required glyph), Console is unable to render the requested glyph.

We are very aware of this limitation (e.g. see #190) and are working on a set of changes to remedy this issue in a future OS release.

All 3 comments

Is this unique to WSL, or does this issue also repro in a normal cmd/powershell window?

Same behavior in WSL and PowerShell.

image

This is most likely caused by a combination of the following:

  1. The glyph for the characters in question likely not available in the currently selected font (Consolas)
  2. Because Console uses GDI to render text, and since GDI does not support font-fallback (a mechanism for dynamically finding and loading a font that does contain the required glyph), Console is unable to render the requested glyph.

We are very aware of this limitation (e.g. see #190) and are working on a set of changes to remedy this issue in a future OS release.

I'm going to close this as a dupe of #190 then.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrmlnc picture mrmlnc  路  3Comments

miniksa picture miniksa  路  3Comments

TayYuanGeng picture TayYuanGeng  路  3Comments

mrmlnc picture mrmlnc  路  3Comments

warpdesign picture warpdesign  路  3Comments