Defect #6256

Redmine considers non ASCII and UTF-16 text files as binary in SCM

Added by Victor Gavro about 7 years ago. Updated 7 months ago.

Status:ClosedStart date:2010-08-31
Priority:LowDue date:
Assignee:Toshi MARUYAMA% Done:

0%

Category:SCM
Target version:1.2.0
Resolution:Fixed Affected version:

Description

If source file contains less than 30% of ascii symbols - redmine threats it as binary.
It's affected when browsing repository:
/projects/PROJECT/repository/entry/FILE
(redmine just starts downloading, not showing source file).
The problem is that redmine relies on string method http://apidock.com/ruby/String/is_binary_data%3F
I understand this is ruby problem, but redmine could do some more checks - at least check for BOM marks.

more information here:
when trying to open files in repository,but downloading s...


Related issues

Related to Redmine - Patch #6416: When viewing utf-8 text file in repository, it is downloaded Closed 2010-09-16
Related to Redmine - Feature #4477: Use mime types in downloading from repository Closed 2009-12-23
Related to Redmine - Feature #2209: MIME type support for repository Entries New 2008-11-17
Related to Redmine - Patch #3770: text/html documents force currently firefox to open downl... New 2009-08-23
Related to Redmine - Feature #6374: File raw view mode Closed 2010-09-12
Duplicated by Redmine - Defect #7134: is_binary_data uses wrong heuristic to decide if a string... Closed 2010-12-19

Associated revisions

Revision 5198
Added by Toshi MARUYAMA over 6 years ago

scm: filesystem: add test of no extension file whose content is only ASCII can be showing (#6256).

Revision 5202
Added by Toshi MARUYAMA over 6 years ago

scm: mercurial: add test of binary file should be force download in functional test (#6256).

Revision 5203
Added by Toshi MARUYAMA over 6 years ago

scm: filesystem: update test repository for non ascii text files displaying (#6256).

Revision 5204
Added by Toshi MARUYAMA over 6 years ago

scm: fix non ascii text files displaying (#6256).

Revision 5205
Added by Toshi MARUYAMA over 6 years ago

scm: filesystem: add test for non ascii text file displaying (#6256).

Revision 5206
Added by Toshi MARUYAMA over 6 years ago

scm: filesystem: add test for UTF-16 file displaying (#6256).

Revision 5207
Added by Toshi MARUYAMA over 6 years ago

scm: filesystem: add test for displaying file over max size limit (#6256).

Revision 5211
Added by Toshi MARUYAMA over 6 years ago

scm: filesystem: increase non ascii contents ratio of test repository (#6256).

History

#1 Updated by Toshi MARUYAMA over 6 years ago

  • Category set to SCM
  • Status changed from New to 7
  • Assignee set to Toshi MARUYAMA

#2 Updated by Toshi MARUYAMA over 6 years ago

  • Subject changed from Redmine considers some not-ascii text files as binary to Redmine considers some not-ascii text files as binary in SCM

#3 Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from 7 to Closed
  • Target version set to 1.2.0
  • Resolution set to Fixed

I finished implementing until r5211.

#4 Updated by Toshi MARUYAMA over 6 years ago

  • Subject changed from Redmine considers some not-ascii text files as binary in SCM to Redmine considers some not-ascii and UTF-16 text files as binary in SCM

#5 Updated by Toshi MARUYAMA over 6 years ago

  • Subject changed from Redmine considers some not-ascii and UTF-16 text files as binary in SCM to Redmine considers non ASCII and UTF-16 text files as binary in SCM

#6 Updated by Toshi MARUYAMA 7 months ago

  • Description updated (diff)

Also available in: Atom PDF