Note that there are some explanatory texts on larger screens.

plurals
  1. POUnicode (utf-8) with git-bash
    primarykey
    data
    text
    <p>I'm having some trouble getting unicode to work for git-bash (on windows 7). I have tried many things without success. Although, I'm not quite sure what is responsible to for this so i might be working in the wrong direction.</p> <p>It really seems this should be possible as the encoding for cmd.exe can be changed to unicode with 'chcp 65001'.</p> <p>Here are some things I've tried (besides the obvious of looking through the configuration options in the GUI).</p> <ol> <li><p>Setting environment variables in '.bashrc'. I guess it makes sense this doesn't work since i think it's a linux thing. The 'locale' command does not exist.</p> <pre><code>export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 </code></pre></li> <li><p>Starting out in cmd.exe, changing the encoding to unicode with 'chcp 65001' and then starting up git-bash. This causes me to get a permission denied when trying to cat my unicode test file. However, catting a file without unicode works just fine. As demonstrated, dropping back out to cmd.exe i can still "cat" the file. Using my default encoding (437) i can cat the file in bash (no permission denied but the output is fudged).</p> <pre><code>S:\&gt;chcp 65001 Active code page: 65001 S:\&gt;"C:\Program Files (x86)\Git\bin\sh.exe" --login -i zarac@TOWELIE /z cat /s/unicode.txt cat: write error: Permission denied zarac@TOWELIE /z cat /s/nounicode.txt abc zarac@TOWELIE /z L /s/unicode.txt -rw-r--r-- 1 zarac Administ 7 May 18 10:30 /s/unicode.txt zarac@TOWELIE /z whoami towelie\zarac zarac@TOWELIE /z exit Z:\&gt;type S:\unicode.txt abc£ </code></pre></li> <li><p>Using the /U flag when starting the shell (makes sense that it doesn't work because it's not quite what it's for if-i-understand-correctly, but it has to do with unicode so i tried it).</p> <pre><code>C:\Windows\SysWOW64\cmd.exe /U /C "C:\Program Files (x86)\Git\bin\sh.exe" --login -i </code></pre></li> <li><p>As I prefer to use Console2, I've tried adding a dword value named CodePage with the value 65001 (decimal) to the windows registry under [HKEY_CURRENT_USER\Console] as well as [HKEY_CURRENT_USER\Console\Git Bash]. This seems to have the same effect as setting 'chcp 65001' accept that it's "automatic". (http://stackoverflow.com/questions/379240/is-there-a-windows-command-shell-that-will-display-unicode-characters)</p></li> <li><p>JPSoft's TCC/LE</p></li> <li><p>PowerCMD</p></li> <li><p>stackoverflow</p></li> <li><p>duckduckgo</p></li> <li><p>ixquick / google</p></li> </ol> <p>So, method 2 seems viable if that permission issue can be fixed. However, I'm open to pretty much any solution although i prefer if i can use Console2 (due mostly to it's nifty tab feature). Perhaps one solution would be to setup an SSH server and then use Putty/Kitty to connect to it, but that's just wrong! ; ) </p> <p>PS. Is there any official documentation for git-bash?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload