UTF-8 Characters Show in SourceTree as Escaped Character Codes

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

 

UTF-8 characters show up in SourceTree as filenames with unusual escaped character codes.

For example, the file:

$ touch どうもありがとうミスターロボット.txt

 

It is showing it as octal-escaped UTF-8 form:

$ git version
git version 1.7.3.1
$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   "\343\201\250\343\202\231\343\201\206\343\202\202\343\201\202\343\202\212\343\201\213\343\202\231\343\201\250\343\201\206\343\203\237\343\202\271\343\202\277\343\203\274\343\203\255\343\203\233\343\202\231\343\203\203\343\203\210.txt"
nothing added to commit but untracked files present (use "git add" to track)

 

 

Cause

By default, Git cannot handle filenames with UTF-8 characters in them.

Resolution

The solution is to configure your Git slightly differently:

git config --global core.quotepath false

(info) More information is can be found on this Stackoverflow post:

Help us improve!

Unknown macro: {kbsurvey}

Last modified on Feb 26, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.