Repository navigation
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributors
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
If the StatusDescription includes Japanese characters, the progress bar becomes corrupted.
Execute the following cmdlet.
using System.Management.Automation;
namespace ReproProgress
{
[Cmdlet(VerbsCommon.Get, "MyItem", SupportsShouldProcess = true)]
public class MyCmdlet : Cmdlet
{
protected override void ProcessRecord()
{
string[] status = new string[] {
"The first stage",
"次の段階",
"その次の段階",
"そのまた次の段階",
"もうすぐ終わるよ",
"完了!"
};
var progress = new ProgressRecord(1, "My Status", "preparing...");
int index = 0;
foreach (var stage in status)
{
progress!.PercentComplete = (++index * 100) / status.Count();
progress.StatusDescription = $"{index:D}/{status.Count()} {stage}";
WriteProgress(progress);
Thread.Sleep(500);
}
progress.RecordType = ProgressRecordType.Completed;
WriteProgress(progress);
}
}
}
Expected behavior
The closing bracket at the end of the progress bar should be displayed on the same line without breaking to a new line.Actual behavior
The closing bracket at the end of the progress bar appears on the next line and remains there even after the progress has completed.Error details
No response
Environment data
Name Value
---- -----
PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributors


Activity
SteveL-MSFT commentedon Mar 4, 2024
Seems like double-wide characters aren't being taken into account when calculating width
yotsuda commentedon Mar 4, 2024
When displaying multiple progress bars, the screen becomes significantly cluttered. This Copy-Item cmdlet in my provider displays multiple progress bars to represent the sub-progress of the contents being copied in the folder. After the main progress bar completes, all sub-progress bars are also marked as completed. However, they remain visible on the screen without disappearing.
https://github.com/PowerShell/PowerShell/assets/6428198/25fd13f5-bbf1-4c5d-9608-e1d14bbfd340
yotsuda commentedon Mar 5, 2024
Steve Lee (@SteveL-MSFT) Thank you so much for taking quick action!
yotsuda commentedon Apr 30, 2024
Hello Steve Lee (@SteveL-MSFT) , could you please let me know if this issue has been resolved? Thank you.
yotsuda commentedon Oct 28, 2024
Hello Steve Lee (@SteveL-MSFT) , I am still waiting for the fix. Could you please provide any updates? I truly appreciate your help.
iSazonov commentedon Oct 28, 2024
For reference #23861 (comment)
yotsuda commentedon Apr 27, 2025
Hello Steve Lee (@SteveL-MSFT) Ilya (@iSazonov) ,
I am still waiting for the fix.
I understand that it is difficult to completely fix this issue without causing a performance degradation.
However, I don't think it is necessary to fully fix it (i.e., to calculate the exact string length) for any arbitrary characters such as emojis.
Since all Japanese hiragana, katakana, and kanji characters are strictly twice as wide as Latin alphabet characters,
would it be possible to at least handle these characters with reasonable computational cost?
I have been struggling with this issue for a long time.
I would greatly appreciate it if you could fix it.
Thank you very much.
iSazonov commentedon Apr 27, 2025
MSFT team hasn't plans to fix this in near time but it can be community PR.
Fix progress bar rendering with double-width unicode characters
Fix progress bar rendering with double-width unicode characters
yotsuda commentedon Oct 13, 2025
Ilya (@iSazonov) I've submitted a community PR to fix this: #26185
Comprehensive testing completed with Japanese, Chinese, Korean, emojis, Thai, and Arabic text. All tests passed successfully.
Fix progress bar rendering with double-width Unicode characters
Fix progress bar rendering with double-width Unicode characters
Fix progress bar rendering with double-width unicode characters
Fix progress bar rendering with double-width Unicode characters
Add xUnit tests for ProgressNode double-width characters (Issue Power…
yotsuda commentedon Apr 11, 2026
Not stale — PR #26185 has been sitting idle for over 5 months waiting for review. All feedback from Ilya (@iSazonov) has been addressed (last review round in late October, final commits on 2025-11-02, commit e0d89df), and no further changes have been requested since.
Steve Lee (@SteveL-MSFT) Ilya (@iSazonov) could I kindly ask for another look when you have time? I'd really appreciate getting this across the finish line. Thank you!