Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,588
Community Members
 
Community Events
165
Community Groups

not able to edit files in bitbucket directly

Hello,

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,
Caroline

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,097 views 2 9
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