Characterset in Sourcetree

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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

28,931 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you