Skip to content

Update calculation of char width to respect CJK chars correctly - #11262

Merged
Ilya (iSazonov) merged 3 commits into
PowerShell:masterfrom
SteveL-MSFT:wide-char-format
Dec 5, 2019
Merged

Ilya (iSazonov) merged 3 commits into
PowerShell:masterfrom
SteveL-MSFT:wide-char-format

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Dec 4, 2019 •

Copy link
Copy Markdown
Member

PR Summary

Need to fix in two places to correctly calculate length of string in buffer cells if the string contains double wide chars. When used interactively, the console host does the calculation, so need to make a method that was only used on Windows available for all platforms and use it to calculate length in buffer cells. When formatting goes through Out-String, then it uses the default length calculation in line output so that needed to use the same method. Since the code is in two different assemblies, there is two copies of the same code.

PR Context

Fix #11232

PR Checklist

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

PoshChan-Bot (@PoshChan) please retry linux

@PoshChan

Copy link
Copy Markdown
Collaborator

Steve Lee (@SteveL-MSFT), successfully started retry of PowerShell-CI-Linux

@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Dec 4, 2019
@iSazonov Ilya (iSazonov) added this to the 7.0.0-rc.1 milestone Dec 4, 2019
@iSazonov

Copy link
Copy Markdown
Collaborator

Steve Lee (@SteveL-MSFT) Is milestone 7.rc1 ok?

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Ilya (@iSazonov) the risk of this change is low, we can take it for rc1

@ghost

Copy link
Copy Markdown

🎉v7.0.0-rc.1 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[My bug report]Typographical confusion with dual-byte characters

5 participants