Prerequisites
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.0
Visuals
In progress:

The end bracket remains after completion:

Prerequisites
Steps to reproduce
If the StatusDescription includes Japanese characters, the progress bar becomes corrupted.
Execute the following cmdlet.
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
Visuals
In progress:

The end bracket remains after completion:
