It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Characterset in Sourcetree

Asbjørn Mikkelsen Aug 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 Feb 09, 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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,011 views 1 20
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you