Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
psreadline multi-line problem with chinese heiti font family #542
Steps to reproduce
1Run terminal software:putty or xshell
2Choose font name 'heiti' or 'microsoft yahei mono'
3Connect to linux and run powershell.
4Paste the following order and press Enter 3 --- 5 times.
Os:from windows 10
1 2 -1 -1
By the chinese powershell study & research group. QQ group No. is 183173532
in 'vscode' or other open source project,in version release notes,bug reporter should be thank.
referenced this issue
Jun 28, 2017
I'm not sure I totally understand the issue, but I did fix another CJK issue, so I hope this is fixed by #561.
I'll publish a pre-release version to the PowerShell Gallery as soon as they support pre-releases.
If you'd like to try a fix before that, you can build the lastest yourself from the master branch, or
Note the version number is now 2.0, so be sure to copy the contents to \PSReadLine\2.0.
1 run the code "Get-StringHash -Text 'powershell躺着进行数值计算'" in powershell core 6.0 beta8 in centos7.
2 download the zip,then put it into '/opt/microsoft/powershell/6.0.0-beta.8/Modules/PSReadLine/2.0'
3 restart my vm,powershell,run the code
I don't think PowerShell Core will load new versions of PSReadLine that way because it has a "trusted platform assembly".
You need to replace these files:
After replacing those files, you can verify you have the latest version with:
Odd. It looks like the error message has the correct text which means PowerShell received the right input. I'm guessing it isn't paste then - do you see the same thing when typing?
I wonder what might be wrong. Maybe PSReadLine is setting the wrong code page? I think the fix was setting the output encoding to Unicode, at least that was the fix on Windows.
FWIW, pasting on Windows works correctly with the KaiTi or NSimSun fonts
Hopefully this is fixed now - reactivate if not. I made one relevant change that was affecting Linux in other ways - I switched from Unicode to UTF8 output - hopefully that fixes the problem you were seeing too.
I'll have an official prerelease build out next week if you want to verify this is fixed, otherwise you can grab a build out of appveyor here.