View Source does not work for text files with unusual extension

In our cloud hosted Bitbucket git repo I have added in some vbscript source code that our development environment exports with the extension scp. The file is a simple text file but Bitbucket does not recognize the file extension and won't allow the source to be shown on the website. Is there away to configure Bitbucket so it will recognize *.scp files as text files?

3 answers

0 votes

Bitbucket does not care for extensions, except when they are image/ mimetypes and so your .scp file should be rendered.

Now we do check to see it the file contains text or binary contents and so it's possible that that is what happened. If the repo is public, go ahead and share the link to the file so we can verify. Otherwise, feel free to reach out to us through support@bitbucket.org.

Lastly, be aware that Bitbucket has some known issues with UTF-16's use of null bytes and Windows tools tend to have a preference to save in UTF-16, you might want to check that too.

The file format does seems to be the problem. The tool we use to edit our vbscript, Macro Scheduler Pro 14.2.07 from mjtnet.com, saves the file in UCS-2 LE BOM format (identified via Notepad++).

The tool has functionality to export UTF-8 but internally it uses the other format. I'd like to avoid the export UTF-8 step and am investigating if a git hook could be used to convert the source to UTF-8 on commit since the tool seem to read UTF-8.

BTW, I verified converting the format to UTF-8 via Notepad++ solved the problem in bitbucket.

 

I've emailed support regarding the issue with our private hosted Bitbucket repo

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

2,289 views 9 12
Read article

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