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

View Source does not work for text files with unusual extension

fkhan-mbl April 7, 2016

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
fkhan-mbl April 8, 2016

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

0 votes
fkhan-mbl April 8, 2016

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.

 

0 votes
evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 7, 2016

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events