Project

General

Profile

Internal Error (invalid byte sequence in UTF-8) when accessing Admin/Settings

Added by Minu Moto about 11 years ago

Hi!
My configuration:

Ruby implementation:
  jruby 1.7.5 (1.9.3p392) 2013-10-07 74e9291 on Java HotSpot(TM) Client VM 1.7.0_25-b16 [Windows Server 2008 R2-x86]
Operating system:
  Microsoft Windows Server 2008 R2 [Version 6.1.7601]
Database:
  PostgreSQL 9.3
Server:
  Webrick
Environment:
  Redmine version 2.3.3.stable
  Ruby version 1.9.3-p392 (2013-10-07) [java]
  Rails version 3.2.13
  Environment production
  Database adapter PostgreSQL
Redmine plugins:
  no plugin installed

When I try to access Admin->Settings with Russian translation, I'm get Internal Error:

ActionView::Template::Error (invalid byte sequence in UTF-8):
  7:
  8: <p><%= setting_select :start_of_week, day_name(1),'1'], [day_name(6),'6'], [day_name(7),'7', :blank => :label_language_based ></p>
  9: <
locale = User.current.language.blank? ? ::I18n.locale : User.current.language >
  10: <p><
= setting_select :date_format, Setting::DATE_FORMATS.collect {|f| [::I18n.l(Date.today, :locale => locale, :format => f), f]}, :blank => :label_language_based ></p>
  11:
  12: <p><
= setting_select :time_format, Setting::TIME_FORMATS.collect {|f| [::I18n.l(Time.now, :locale => locale, :format => f), f]}, :blank => :label_language_based %></p>
  13:
app/helpers/settings_helper.rb:38:in `setting_select'
app/views/settings/_display.html.erb:10:in `_app_views_settings__display_html_erb__912948922_14104'
app/views/settings/_display.html.erb:1:in `_app_views_settings__display_html_erb__912948922_14104'
app/views/common/_tabs.html.erb:24:in `_app_views_common__tabs_html_erb__398022901_13972'
app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb__398022901_13972'
app/helpers/application_helper.rb:271:in `render_tabs'
app/views/settings/edit.html.erb:3:in `_app_views_settings_edit_html_erb___540221663_13968'
app/controllers/settings_controller.rb:28:in `index'

If I replace in config/locales/ru.yml month_name 'октября' with 'October' and time:am 'утра' with 'am', then everything is going fine.
Please help me to fix this problem in the right way.
Thank for any help!
PS: Sorry for my bad english:)


Replies (2)

RE: Internal Error (invalid byte sequence in UTF-8) when accessing Admin/Settings - Added by Minu Moto about 11 years ago

Problem lies in jruby strftime: it breaks unicode characters in format string...

    (1-2/2)