8 lines
392 B
Plaintext
8 lines
392 B
Plaintext
# 递归查找所有C++源文件并转换为UTF-8 在src目录运行PowerShell脚本
|
|
|
|
Get-ChildItem -Path "." -Include "*.h","*.cpp","*.hpp" -Recurse | ForEach-Object {
|
|
$content = Get-Content $_.FullName -Raw -Encoding Default
|
|
$utf8 = [System.Text.Encoding]::UTF8
|
|
[System.IO.File]::WriteAllText($_.FullName, $content, $utf8)
|
|
Write-Host "Converted: $($_.FullName)"
|
|
} |