Actions
Defect #10593
closedError: 'incompatible character encodings: UTF-8 and ASCII-8BIT' (old annoing issue) on ruby-1.9.3
Defect #10593:
Error: 'incompatible character encodings: UTF-8 and ASCII-8BIT' (old annoing issue) on ruby-1.9.3
Resolution:
Fixed
Affected version:
Description
My instance Redmine was gradually upgraded from 0.7 and older.
When I upgrade to ruby-1.9.3, some projects issues list crashes with 'incompatible character encodings: UTF-8 and ASCII-8BIT'.
The trouble be found in CustomField: Browser (type: list)
In DB possible_values was serialized as:
and deserialized into string with #<Encoding:ASCII-8BIT>.
Solution:
$> script/console production
c = CustomField.find(5)
c.possible_values.each {|i| i.force_encoding('UTF-8')}
c.save
Now, value serialized as:
and work fine!
Actions