-
Notifications
You must be signed in to change notification settings - Fork 60
/
to_utf8.ps1
43 lines (40 loc) · 1.14 KB
/
to_utf8.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Get-ChildItem .\src -Recurse -Include *.cpp |
Rename-Item -NewName {
$_.FullName + ".bkup"
}
Get-ChildItem .\src -Recurse -Include *.cpp.bkup |
ForEach-Object {
Get-Content $_.FullName |
Out-File -Encoding UTF8 ($_.FullName -replace '.cpp.bkup','.cpp')
Remove-Item $_.FullName
}
Get-ChildItem .\src -Recurse -Include *.h |
Rename-Item -NewName {
$_.FullName + ".bkup"
}
Get-ChildItem .\src -Recurse -Include *.h.bkup |
ForEach-Object {
Get-Content $_.FullName |
Out-File -Encoding UTF8 ($_.FullName -replace '.h.bkup','.h')
Remove-Item $_.FullName
}
Get-ChildItem .\gtests -Recurse -Include *.cpp |
Rename-Item -NewName {
$_.FullName + ".bkup"
}
Get-ChildItem .\gtests -Recurse -Include *.cpp.bkup |
ForEach-Object {
Get-Content $_.FullName |
Out-File -Encoding UTF8 ($_.FullName -replace '.cpp.bkup','.cpp')
Remove-Item $_.FullName
}
Get-ChildItem .\gtests -Recurse -Include *.h |
Rename-Item -NewName {
$_.FullName + ".bkup"
}
Get-ChildItem .\gtests -Recurse -Include *.h.bkup |
ForEach-Object {
Get-Content $_.FullName |
Out-File -Encoding UTF8 ($_.FullName -replace '.h.bkup','.h')
Remove-Item $_.FullName
}