Skip to content

Instantly share code, notes, and snippets.

@hkuno9000
Last active October 14, 2015 00:10
Show Gist options
  • Save hkuno9000/f210deb2df075d556310 to your computer and use it in GitHub Desktop.
Save hkuno9000/f210deb2df075d556310 to your computer and use it in GitHub Desktop.
set LANG and LESSCHARSET for the msysgit on windows cmd shell
@echo off
if "%1"=="sjis" goto sjis
if "%1"=="utf8" goto utf8
if "%1"=="clear" goto clear
echo usage: %0 [ sjis ^| utf8 ^| clear ]
goto end
:sjis
set LANG=ja_JP.SJIS
set LESSCHARSET=dos
set TZ=JST-9
goto end
:utf8
set LANG=ja_JP.UTF-8
set LESSCHARSET=utf-8
set TZ=JST-9
goto end
:clear
set LANG=
set LESSCHARSET=
set TZ=
goto end
:end
echo LANG=%LANG%
echo LESSCHARSET=%LESSCHARSET%
echo TZ=%TZ%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment