Project

General

Profile

Actions

Patch #6416

closed

When viewing utf-8 text file in repository, it is downloaded

Added by Masahiro Tomita about 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
2010-09-16
Due date:
% Done:

0%

Estimated time:

Description

I want to view the utf-8 text file in repository, but it is downloaded.

In RepositoriesController#entry(), String#is_binary_data? is used to determine the file is binary or not.
But String#is_binary_data? return true even if the file is utf-8 text.

I wrote a patch to fix this problem.


Files

repositories_controller.patch (1.13 KB) repositories_controller.patch Masahiro Tomita, 2010-09-16 17:37

Related issues

Related to Redmine - Defect #6256: Redmine considers non ASCII and UTF-16 text files as binary in SCMClosedToshi MARUYAMA2010-08-31

Actions
Actions #1

Updated by Yar Isakov almost 14 years ago

I want to confirm this bug. Some files in utf-8 encoding are downloading instead of showing.

Actions #2

Updated by Toshi MARUYAMA almost 14 years ago

  • Category set to SCM
Actions #3

Updated by Toshi MARUYAMA over 13 years ago

  • Status changed from New to 7
  • Assignee set to Toshi MARUYAMA
Actions #4

Updated by Toshi MARUYAMA over 13 years ago

  • Status changed from 7 to Closed
  • Assignee deleted (Toshi MARUYAMA)

I confirmed source:trunk/config/locales/ja.yml is as binary.
repositories_controller.patch is only for UTF-8.
Redmine supports multi encoding.
For example, ISO-8859-1, Japanese Shift_JIS, EUC-JP...
Iconv passes converting from ISO-8859-1 to UTF-8 with no error.

I will fix #6256 in another way.

Actions

Also available in: Atom PDF