You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HelpBuilder.WriteColumns assumes that each UTF-16 char takes up one character cell in the terminal, but this assumption does not hold for fullwidth characters used in Chinese, Japanese, and Korean. Fixing this needs a character-width lookup similar to the wcwidth function.
Help in Korean is incorrectly wrapped by .NET SDK 7.0.100 on Windows Terminal Preview 1.16.2641.0, code page 65001, 80-column window:
C:\>SET DOTNET_CLI_UI_LANGUAGE=ko-KR
C:\>chcp 65001
Active code page: 65001
C:\>dotnet new globaljson --help
global.json 파일
작성자 :Microsoft
설명: .NET SDK 버전을 선택하기 위한 파일입니다.
Usage:
dotnet new globaljson [options] [템플릿 옵션]
Options:
-n, --name <name> 생성 중인 출력의 이름입니다. 이름을 지정하지 않으면 출
력 디렉터리의 이름이 사용됩니다.
-o, --output <output> 생성된 출력을 배치할 위치입니다.
--dry-run 템플릿이 생성될 경우 주어진 명령 줄이 실행되면 어떤 일
이 발생하는지에 대한 요약을 표시합니다.
(deleted the rest of the output)
In contrast, output in en-US is correctly wrapped:
C:\>dotnet new globaljson --help
global.json file
Author: Microsoft
Description: A file for selecting the .NET SDK version.
Usage:
dotnet new globaljson [options] [template options]
Options:
-n, --name <name> The name for the output being created. If no name is
specified, the name of the output directory is used.
-o, --output <output> Location to place the generated output.
--dry-run Displays a summary of what would happen if the given
command line were run if it would result in a template
creation.
microsoft/terminal#8000 mentions some complexities of measuring text in a character terminal, but System.CommandLine needs to be portable and cannot examine the glyphs of the font like Windows Terminal can.
Activity
KalleOlaviNiemitalo commentedon Nov 24, 2022
microsoft/terminal#8000 mentions some complexities of measuring text in a character terminal, but System.CommandLine needs to be portable and cannot examine the glyphs of the font like Windows Terminal can.