windows git bash 한글 유니코드 utf8로 설정하는 방법
windows git bash 한글 유니코드 utf8로 설정하는 방법
* 현재 언어 설정(로케일) 확인
$ locale
LANG=
LC_CTYPE="ko_KR.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_ALL=
//-------------------------------------
- 테스트 방법1
한글 파일이 있는 폴더에서 ls 명령 실행
- 테스트 방법2
$ echo "ä"
$ echo -e "\0303\0244"
ä
//-------------------------------------
* 로케일 변경 설정
~/.bash_profile 파일 수정
LANG="ko_KR.UTF-8"
export LANG
//-------------------------------------
// 참고
* vs code 에서 git bash를 기본 터미널로 설정 방법
%UserProfile%\AppData\Roaming\Code\User\settings.json 파일 수정
"terminal.integrated.defaultProfile.windows": "Git Bash",
"terminal.integrated.profiles.windows": {
"Git Bash": {
"path": "C:\\Program Files\\Git\\bin\\bash.exe"
},
//-------------------------------------
참고
https://www.tecmint.com/set-system-locales-in-linux/
https://stackoverflow.com/questions/10651975/unicode-utf-8-with-git-bash
https://neutrondev.com/vs-code-integrate-git-bash-default-terminal/