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

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

not able to edit files in bitbucket directly


If i try to edit file directly from the web I'm getting following error

"Failed to detect original file encoding. Cannot save commit with unknown encoding"


I renamed file name from test-file to testfile. Still getting same error. Please help me to resolve it.

1 answer

0 votes
Caroline R Atlassian Team Jul 23, 2021

Hi, @anil kumar K! Welcome to the community! 

Just to give you some context around this behavior, Bitbucket tries to guess a file's encoding and, when it fails, issues like this may arise. 

We already have a feature request to allow users to specify the encoding for a repository, which I believe would solve issues like this: 

I've linked your question to this feature. Please consider adding yourself as a watcher, this way you get updated as we make progress with this. 

If you are not familiar with our Feature Request Policy, you can read more about it here.

With that said, could you confirm what encoding you are using for this specific file? 

One suggestion would be to use utf-8 encoding for this file, if possible (e.g. if you use different encoding because you want to use e.g. Japanese characters, this won't be a feasible solution I guess). If it's ok for you to use utf-8, you can try deleting this file, and create a new one (with the contents of the deleted) and make sure it uses utf-8 encoding. Commit and push it to Bitbucket. Then please let me know if editing it online works for you.

I hope this helps, but please let me know if you face any obstacles. 

Kind regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

129 views 0 2
Join discussion

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