Hi
Why I get error for edit file?
Hello @Hossein Ali Reza Asgari and welcome to the community!
This is usually caused when you copy/paste the filename which might bring some invalid UTF-8 characters causing the encoding error. If that is the case, you can try manually typing the name of the file instead and see if the error persists.
Another alternative is to clone the repository locally, make the changes to the file locally, and then push the changes back to Bitbucket Cloud.
Thank you, @Hossein Ali Reza Asgari !
Patrik S
I had the same problem, but I didn’t copy-and-paste the file name. The file name was:
main.c
Very standard name. I don’t understand what the problem is. Please help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gilbert,
What is the encoding of this file? Bitbucket tries to guess a file's encoding and, when it fails, issues like this may arise.
We have a feature request for the ability to specify a repository's encoding:
In the meantime, you can edit the file locally, commit and push to Bitbucket.
I would also suggest using UTF-8 encoding for files, if possible.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am seeing this error on a file whose original encoding is ANSI with PC line endings.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Michelle Richmond ,
Could you try to edit the file locally, commit and push and check if the error persists?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.