Created
July 24, 2022 00:30
-
-
Save chenbojian/8180b3ded9dd427925df250212613f81 to your computer and use it in GitHub Desktop.
gbk to utf8
This file contains 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
function Convert-Gbk-To-Utf8($source, $dest) { | |
$gbk = [System.Text.Encoding]::GetEncoding("gb2312") | |
$utf8 = [System.Text.Encoding]::UTF8 | |
$text = [System.IO.File]::ReadAllText($source, $gbk) | |
[System.IO.File]::WriteAllText($dest, $text, $utf8) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment