#TIL #windows #powershell utf-8로 파일 인코딩 변경

C:\> PowerShell -Command "(Get-Content input.txt) | Set-Content -Encoding utf8 output.txt"

powershell을 쓰는 게 가장 간단하다. 괄호로 감싸야지 다 읽고 파일 핸들을 release 하므로 같은 파일 encoding을 바로 변경할 수 있다.

참고 - Converting text file to UTF-8 on Windows command prompt - superuser.com

Feedback plz <3 @ohyecloudy, ohyecloudy@gmail.com

A Random Post