Fisheye renders binary file in SVN repository as text

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When viewing a binary file stored in an SVN repository, the Source or Diff windows will show an ASCII rendering of the file.

Diagnosis

Environment

  • This only happens with SVN repositories

Diagnostic Steps

  • Obtain a copy of the original file which is not showing properly.
  • Test in a local repository.

Cause

Per SVN Red Book: Automatic Properties if the SVN properties are not manually set on a file, SVN will try to auto-detect the file type.  The auto-detection algorithm will sometimes fail, causing SVN to default set the property svn:mimetype type to blank, and assume the file is text.

Resolution

Manually set the MIME type for the file.

  • For a list of all MIME types, please refer to The Complete List of MIME Types

    svn propset svn:mimetype MIME_TYPE FILE_NAME
  • Replace MIME_TYPE with the official type (e.g. application/pdf) and FILE_NAME with the name of the file in the repository

Last modified on Jul 31, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.