Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Characterset in Sourcetree

Asbjørn Mikkelsen August 15, 2016

Having trouble with sourcetree-bitbucket-git, and charactersets.
Default in sourcetree is utf-8,  under "repo settings"

if I try to commit a file that is windows-1252 format (latin1, iso-8859-1 etc), which contains norwegian characters (æ, ø, å) then in the view where you select "hunk" to stage:

image2016-8-16 11:9:30.png

those black dots should be å, and I get this error message:

---------------------------
Error encountered
---------------------------
'git apply' failed with code 1: Checking patch xxx/file.sql...
error: while searching for:
xxx uniqueidentifier,
xx uniqueidentifier,
xxx int NULL,
DRGGrupperingAvslutningsm�te varchar(1) NOT NULL,
xxx int NULL,
xxx bit NOT NULL,
xxx bit NOT NULL,

error: patch failed: xxx/file.sql:15
error: xxx/file.sql: patch does not apply

See C:\Users\xxxx\AppData\Local\Atlassian\SourceTree\LastFailedPatch.txt for patch details (D:\xxx)
---------------------------
OK
---------------------------

If I change to one of the other charactersets in the sourcetree config, then it looks ok in the window:

image2016-8-16 11:12:31.png

but I still get an error message, but now it seems like sourcetree is toying around with utf-16?

image2016-8-16 11:13:13.png

(you get two garbled characters where it should be one, typical for utf-16 rubbish)

If I convert the file to utf-8, then I get lots more errors on the other lines with text in the file that have these characters, so that is obviously no-go.

and now it starts to garble other text in sourcetree gui also, in the list of staged files:

image2016-8-16 11:15:31.png

the the tekst there should be NpkKjører, and in the commit log list it also does the same:

image2016-8-16 11:16:41.png

should read: "prøver å fikse.."

What on earth is going on here?

I had no problem uploading the whole repository with sourcetree, now It's impossible to commit code ?

Running the latest version, 1.9.6.1

Tested with system git, and embedded git, no difference.

 

 

 

 

1 answer

0 votes
Airton Filho February 9, 2017

We are having the same issue with version 1.9.10.0 on Windows 7.

How can we solve that?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events