https://www.redmine.org/
https://www.redmine.org/favicon.ico?1679302129
2015-03-08T15:13:06Z
Redmine
Redmine - Defect #19305: settings: incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8
https://www.redmine.org/issues/19305?journal_id=62047
2015-03-08T15:13:06Z
Toshi MARUYAMA
<ul><li><strong>Category</strong> changed from <i>Administration</i> to <i>Database</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li></ul>
Redmine - Defect #19305: settings: incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8
https://www.redmine.org/issues/19305?journal_id=62048
2015-03-08T15:19:31Z
Toshi MARUYAMA
<ul></ul><pre>
$ ruby --version
ruby 1.8.7 (2014-01-28 patchlevel 376) [x86_64-linux]
$ irb
1.8.7-head :001 > require 'yaml'
=> true
1.8.7-head :002 > puts YAML.dump([{'status_id' => '0'}, {'keywords' => 'fixes,closes,исправлено,готово,сделано,fixed'}])
---
- status_id: "0"
- keywords: !binary |
Zml4ZXMsY2xvc2VzLNC40YHQv9GA0LDQstC70LXQvdC+LNCz0L7RgtC+0LLQ
vizRgdC00LXQu9Cw0L3QvixmaXhlZA==
=> nil
</pre>
Redmine - Defect #19305: settings: incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8
https://www.redmine.org/issues/19305?journal_id=62050
2015-03-08T15:44:46Z
Gena Makhomed
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>ruby 1.8.7 (2014-01-28 patchlevel 376) [x86_64-linux]</p>
</blockquote>
<p>Inside redmine 2.5.2 container with CentOS 6 and ruby 1.8.7 <br />I see exactly same output, but inside redmine 2.6.2 container <br />with CentOS 7 I am use different version of ruby <br />and see different YAML.dump() results:</p>
<pre>
$ rpm -q ruby
ruby-2.0.0.353-22.el7_0.x86_64
$ ruby --version
ruby 2.0.0p353 (2013-11-22) [x86_64-linux]
$ irb
irb(main):001:0> require 'yaml'
=> true
irb(main):002:0> puts YAML.dump([{'status_id' => '0'}, {'keywords' => 'fixes,closes,исправлено,готово,сделано,fixed'}])
---
- status_id: '0'
- keywords: fixes,closes,исправлено,готово,сделано,fixed
=> nil
</pre>
<p>locale settings inside new 2.6.2 and old 2.5.2 redmine containers are identical:</p>
<pre>
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
</pre>
Redmine - Defect #19305: settings: incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8
https://www.redmine.org/issues/19305?journal_id=62051
2015-03-08T16:14:34Z
Toshi MARUYAMA
<ul></ul><p>This is very dirty workaround.<br /><pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/models/setting.rb b/app/models/setting.rb
</span><span class="gd">--- a/app/models/setting.rb
</span><span class="gi">+++ b/app/models/setting.rb
</span><span class="p">@@ -96,6 +96,17 @@</span> class Setting < ActiveRecord::Base
# Unserialize serialized settings
v = YAML::load(v) if @@available_settings[name]['serialized'] && v.is_a?(String)
v = v.to_sym if @@available_settings[name]['format'] == 'symbol' && !v.blank?
<span class="gi">+ if v.is_a?(String) && v.respond_to?(:force_encoding)
+ v.force_encoding('UTF-8')
+ elsif v.is_a?(Array)
+ v.each do |i|
+ if i.is_a?(Hash)
+ i.each do |k, v1|
+ v1.force_encoding('UTF-8') if v1.is_a?(String) && v1.respond_to?(:force_encoding)
+ end
+ end
+ end
+ end
</span> v
end
</code></pre></p>
Redmine - Defect #19305: settings: incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8
https://www.redmine.org/issues/19305?journal_id=62052
2015-03-08T16:15:59Z
Toshi MARUYAMA
<ul><li><strong>Subject</strong> changed from <i>can't enter to /settings after upgrade from 2.5.2 to 2.6.2: ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT)</i> to <i>incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8</i></li></ul>
Redmine - Defect #19305: settings: incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8
https://www.redmine.org/issues/19305?journal_id=62053
2015-03-08T16:17:15Z
Toshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/13617">Defect #13617</a>: Internal error on custum queries after Upgrade 2.2 -> 2.3</i> added</li></ul>
Redmine - Defect #19305: settings: incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8
https://www.redmine.org/issues/19305?journal_id=62056
2015-03-08T17:16:33Z
Toshi MARUYAMA
<ul><li><strong>Target version</strong> set to <i>2.6.3</i></li></ul>
Redmine - Defect #19305: settings: incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8
https://www.redmine.org/issues/19305?journal_id=62274
2015-03-15T14:44:46Z
Toshi MARUYAMA
<ul><li><strong>Subject</strong> changed from <i>incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8</i> to <i>settings: incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8</i></li></ul>
Redmine - Defect #19305: settings: incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8
https://www.redmine.org/issues/19305?journal_id=62278
2015-03-15T18:14:17Z
Jean-Philippe Lang
jp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Confirmed</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Jean-Philippe Lang</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul>