Project

General

Profile

Actions

Defect #13520

closed

Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.

Added by Ondřej Surý over 11 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
I18n
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

There's "incompatible character encodings: ASCII-8BIT and UTF-8" error when accessing:

  • Editing a user
  • Create new user
  • Register new user
  • Admin/Settings
  • My account

Data in the database is encoded correctly, so it must be something in the code. I suspect it might be similar to #13354.

There's already discussion on the Forum, here's the link: http://www.redmine.org/boards/1/topics/36573?r=36807

Environment:
Ruby: 1.9.3.0-1ubuntu2.5
Rails: 3.2.12-1~precise+1
Redmine: 2.2.3+dfsg1-1~precise+1
Postgresql: 9.1+129ubuntu1
Database encoding: UTF8 (cs_CZ.utf8 Collate and Ctype)

About your application's environment
Ruby version              1.9.3 (x86_64-linux)
RubyGems version          1.8.11
Rack version              1.4
Rails version             3.2.12
Active Record version     3.2.12
Action Pack version       3.2.12
Active Resource version   3.2.12
Action Mailer version     3.2.12
Active Support version    3.2.12
Application root          /root
Environment               production

There are no third party plugins installed. Database has been migrated, etc.

Admin::Settings

Started GET "/settings" for 2001:1488:ac14:1400:d13c:c0da:c7a:1591 at 2013-03-19 12:10:20 +0100
Processing by SettingsController#index as HTML
  Current user: oerdnj (id=3)
  Rendered settings/_general.html.erb (5.5ms)
  Rendered settings/_display.html.erb (4.5ms)
  Rendered common/_tabs.html.erb (13.2ms)
  Rendered settings/edit.html.erb within layouts/admin (13.6ms)
Completed 500 Internal Server Error in 18ms

ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8):
    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: 
    14: <p><%= setting_select :user_format, @options[:user_format] %></p>
    15: 
    16: <p><%= setting_check_box :gravatar_enabled %></p>
    17: 
  app/views/settings/_display.html.erb:14:in `block in _app_views_settings__display_html_erb__674035618379178024_39546840'
  app/views/settings/_display.html.erb:1:in `_app_views_settings__display_html_erb__674035618379178024_39546840'
  app/views/common/_tabs.html.erb:24:in `block in _app_views_common__tabs_html_erb__627508277035447565_39247520'
  app/views/common/_tabs.html.erb:23:in `each'
  app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb__627508277035447565_39247520'
  app/helpers/application_helper.rb:263:in `render_tabs'
  app/views/settings/edit.html.erb:3:in `_app_views_settings_edit_html_erb__2074124438297187009_39241520'
  app/controllers/settings_controller.rb:26:in `index'

Editing a user:

Started GET "/users/107/edit" for 2001:1488:ac14:1400:79ab:40d8:87cb:6a80 at 2013-03-11 12:50:56 +0100
Processing by UsersController#edit as HTML
  Parameters: {"id"=>"107"}
  Current user: beda (id=10)
  Rendered users/_mail_notifications.html.erb (7.3ms)
  Rendered users/_preferences.html.erb (5.1ms)
  Rendered users/_form.html.erb (18.1ms)
  Rendered users/_general.html.erb (19.4ms)
  Rendered users/_groups.html.erb (8.5ms)
  Rendered users/_memberships.html.erb (76.5ms)
  Rendered common/_tabs.html.erb (107.4ms)
  Rendered users/edit.html.erb within layouts/admin (110.9ms)
Completed 500 Internal Server Error in 174ms

ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8):
    21: </script>
    22:
    23: <% tabs.each do |tab| -%>
    24:   <%= content_tag('div', render(:partial => tab[:partial], :locals => {:tab => tab} ),
    25:                        :id => "tab-content-#{tab[:name]}",
    26:                        :style => (tab[:name] != selected_tab ? 'display:none' : nil),
    27:                        :class => 'tab-content') %>
  app/views/common/_tabs.html.erb:24:in `block in _app_views_common__tabs_html_erb___2669574904331897537_40463380'
  app/views/common/_tabs.html.erb:23:in `each'
  app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb___2669574904331897537_40463380'
  app/helpers/application_helper.rb:263:in `render_tabs'
  app/views/users/edit.html.erb:9:in `_app_views_users_edit_html_erb__1292716952840611560_40398560'

Registering a new user:

Started POST "/account/register" for 2001:1488:ac14:1400:748b:e807:ee3f:35a9 at 2013-03-11 12:47:15 +0100
Processing by AccountController#register as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "user"=>{"login"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "firstname"=>"[FILTERED]", "lastname"=>"[FILTERED]", "mail"=>"[FILTERED]", "language"=>"en", "identity_url"=>""}, "commit"=>"Submit"}
  Current user: anonymous
  Rendered account/register.html.erb within layouts/base (5.1ms)
Completed 500 Internal Server Error in 17ms

ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
    16: <p><%= f.text_field :firstname, :required => true %></p>
    17: <p><%= f.text_field :lastname, :required => true %></p>
    18: <p><%= f.text_field :mail, :required => true %></p>
    19: <p><%= f.select :language, lang_options_for_select %></p>
    20:
    21: <% if Setting.openid? %>
    22:   <p><%= f.text_field :identity_url  %></p>
  app/views/account/register.html.erb:19:in `block in _app_views_account_register_html_erb__167052182036648489_43437100'
  app/helpers/application_helper.rb:991:in `labelled_form_for'
  app/views/account/register.html.erb:3:in `_app_views_account_register_html_erb__167052182036648489_43437100'

Creating a new user:

Started GET "/users/new" for 217.31.207.1 at 2013-03-11 12:58:29 +0100
Processing by UsersController#new as HTML
  Current user: oerdnj (id=3)
  Rendered users/_mail_notifications.html.erb (1.9ms)
  Rendered users/_preferences.html.erb (5.0ms)
  Rendered users/_form.html.erb (12.6ms)
  Rendered users/new.html.erb within layouts/admin (15.3ms)
  Rendered admin/_menu.html.erb (3.8ms)
  Rendered layouts/base.html.erb (94.9ms)
Completed 500 Internal Server Error in 122ms

ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
    55:         <%= yield :sidebar %>
    56:         <%= view_layouts_base_sidebar_hook_response %>
    57:     </div>
    58: 
    59:     <div id="content">
    60:         <%= render_flash_messages %>
    61:         <%= yield %>
  app/views/layouts/base.html.erb:58:in `_app_views_layouts_base_html_erb___556530348464672222_26602040'
  app/views/layouts/admin.html.erb:8:in `_app_views_layouts_admin_html_erb___1166907481205184341_39459180'


Files

issue-13520.diff (915 Bytes) issue-13520.diff Toshi MARUYAMA, 2013-03-20 15:47
issue-13520-1.diff (1.01 KB) issue-13520-1.diff Toshi MARUYAMA, 2013-03-20 18:26
123.jpg (136 KB) 123.jpg screen anton profit, 2015-02-26 16:03

Related issues

Related to Redmine - Feature #12475: Lazy loading of translation files for faster startupClosedJean-Philippe Lang

Actions
Has duplicate Redmine - Defect #14710: Settings the left 500 error in ruby1.9.2Closed

Actions
Actions

Also available in: Atom PDF