Defect #33845

Wrong character encoding in git diffs with UTF-8 Cyrillic letters

Added by Ivan Cenov over 2 years ago. Updated over 2 years ago.

Status:ConfirmedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:4.1.1



I use git repositories. The access to them is via Apache server running on Windows 10 machine. Several files contain Cyrillic texts in comments. These files are in UTF-8 encoding. Redmine shows these files well - the Cyrillic texts are readable. Example:

      puts "\nОбработени #{options[:passedfiles]} файла" 
      puts "Пропуснати #{options[:omittedfiles]} файла" 

However, these Cyrillic texts are not displayed well in revision diffs. Example:

  puts "\nОбработени #{options[:passedfiles]} файла" 
  puts "Пропуснати #{options[:omittedfiles]} файла" 


  Redmine version                4.1.1.stable
  Ruby version                   2.6.5-p114 (2019-10-01) [x64-mingw32]
  Rails version        
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
  Subversion                     1.8.19
  Git                            2.25.1
Redmine plugins:
  issue_recurring                1.6
  redmine_code_review            1.0.0
  redmine_issue_templates        1.0.4
  redmine_latex_mathjax          0.4.0
  redmine_theme_changer          0.4.0

33845-diff-screenshot.png (67.1 KB) Go MAEDA, 2020-08-24 04:36


#1 Updated by Go MAEDA over 2 years ago

I could not reproduce the issue. The diff displayed correctly.

What value is set for "Attachments and repositories encodings" (Administration > Settings > Files)?

#2 Updated by Ivan Cenov over 2 years ago

Two encodings are set in this order: windows-1251, UTF-8.

#3 Updated by Go MAEDA over 2 years ago

  • Status changed from New to Confirmed

Also available in: Atom PDF