findstr /c:"OneDrive Standalone Update Task" d:\77777.txt
PowerShell -Command "& {Get-Content d:\out555.txt | Set-Content d:\77777.txt -Encoding utf7}"
Get-Content d:\txt2.txt | Set-Content d:\77777.txt -Encoding oem
문서 하단에 UTF-8 이라고 적혀 있는대.
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_character_encoding?view=powershell-7.3
https://stricky.tistory.com/160
문제는 findstr 명령은 UTF8만 지원 한다는 거다
chcp 65001
chcp 949
이걸로 변경 해도 안된다.
https://cafe.daum.net/candan/GGFN/402
오직 문서를 UTF8로 변경 해야 한다.
배치 파일에서는 chcp로 해서 상관 없는대. 입력 파일이 UTF16인 경우 작동 안할수 있다.
결론. 아무튼 UTF7으로 인코딩 하면 8로 알아서 되지만
가장 이상적인 것은 oem으로 명령을 주고 하는 것이 가장 잘 되는 것 같다.
-Encoding oem
cmd에서 findstr 백날 검색 해도 안나오는 경우. 결론이다. 나 같은 초심자를 위해 써본다.