Skip to content

Instantly share code, notes, and snippets.

@fcicq
Last active May 8, 2020 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fcicq/867e97bab600d43d8920b8d06ca6de39 to your computer and use it in GitHub Desktop.
Save fcicq/867e97bab600d43d8920b8d06ca6de39 to your computer and use it in GitHub Desktop.
powershell convert cp1252 to sjis. same as iconv -f utf8 -t windows-1252 | iconv -f sjis
$cp1252 = [System.Text.Encoding]::GetEncoding(1252);
$cp932 = [System.Text.Encoding]::GetEncoding(932);
Read-Host "Input Mojibake" | foreach{ $cp932.getstring($cp1252.getbytes($_))}
@fcicq
Copy link
Author

fcicq commented May 8, 2020

Read-Host "Input Text to Mojibake" | foreach{ $cp1252.getstring($cp932.getbytes($_))}

@fcicq
Copy link
Author

fcicq commented May 8, 2020

Get-Clipboard -Format Text is good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment