Created
May 12, 2024 01:49
-
-
Save ariel-co/d1eb1ee895cae204194c5b504af42fed to your computer and use it in GitHub Desktop.
how strings get garbled by wrong encodings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [System.Text.Encoding]::UTF8.GetBytes("é") | % ToString X2 | Join-String -Separator " " | |
| # C3 A9 | |
| [System.Text.Encoding]::Latin1.GetBytes("é") | % ToString X2 | Join-String -Separator " " | |
| # E9 | |
| [System.Text.Encoding]::Latin1.GetString( [System.Text.Encoding]::UTF8.GetBytes("é") ) | |
| # é |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment