Invisible symbol: paste "€" in PowerShell 7.2.0-preview.5
See original GitHub issueSteps to reproduce
copy to clipboard
"item=1000€"
✔paste in Windows PowerShell
PS C:\Users\jeffery> "item=1000€"
❌paste in PowerShell 7.2.0-preview.5
PS C:\Users\jeffery> "item=1000"
Expected behavior && Actual behavior
Environment data
Name Value
---- -----
PSVersion 7.2.0-preview.5
PSEdition Core
GitCommitId 7.2.0-preview.5
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Name Value
---- -----
PSVersion 5.1.19041.906
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.906
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (3 by maintainers)
Top Results From Across the Web
about Special Characters - PowerShell
Describes the special character sequences that control how PowerShell interprets the next characters in the sequence.
Read more >unicode - PowerShell script runs when pasted into the ...
When Windows PowerShell reads this sequence as "ANSI"-encoded, it considers each byte a character in its own right, which is why you saw...
Read more >Troubleshooting Invisible / Hidden Characters in your ...
Recently I was helping a colleague with a PowerShell script, things were going great until we ran the code and nothing was outputting....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As I read through the comments, it seems this is still an issue that only reproduces with mouse right clicking, not with the <kbd>Ctrl+v</kbd> key-binding. If so, then this is due to the .NET issue https://github.com/dotnet/runtime/issues/38966.
I can only reproduce the issue in
conhost
from Windows 11 – the Unicode char is skipped when right-clicking paste, but not when pasting with <kbd>Ctrl+v</kbd>. Both work fine in Windows Terminal for me.There are quite a few duplicate issues in PSReadLine/PowerShell repos due to the same .NET issue:
@StevenBucher98 I can reproduce the problem in pwsh 7.2.4.
The difference in right click and ctrl+v in VS Code is explained because we have this keybinding built-in:
This allows PSReadLine to handle pasting which does a better job with multi-line strings. Right click just does a regular paste and I don’t think we should fix this to have a similar send a sequence to PSReadLine on click until custom mouse bindings are implemented (https://github.com/microsoft/vscode/issues/3130).
So the problem here is pwsh for some reason filters out the
€
character, the fact that it works fine in cmd.exe means this is a problem in pwsh. Can you please reopen this?