Defect #16432
closed
Export CSV : simple quotes replaced by "?" in description
Added by Johan Guilbaud over 10 years ago.
Updated over 10 years ago.
Description
Hello
When exporting in CSV with descriptions
"'" are replaced by "?"
Files
Environment:
Redmine version 2.4.2.stable
Ruby version 2.1.0-p0 (2013-12-25) [x86_64-linux]
Rails version 3.2.16
Environment production
Database adapter Mysql2
Works for me (see attached file), can you give more details?
I've just discovered, it's not simple quote ' but a quote ’ (i don't know the name of this quote...)
- Status changed from Needs feedback to Closed
- Resolution set to Invalid
You need to change general_csv_encoding from ISO-8859-1 to CP1252 or UTF-8.
source:tags/2.5.1/config/locales/en.yml#L143
$ irb
1.9.3-p545 :001 > s = '’'
=> "’"
1.9.3-p545 :002 > e = s.encode("ISO-8859-1")
Encoding::UndefinedConversionError: U+2019 from UTF-8 to ISO-8859-1
from (irb):2:in `encode'
from (irb):2
from /home/xxxx/.rvm/rubies/ruby-1.9.3-p545/bin/irb:12:in `<main>'
1.9.3-p545 :003 > e = s.encode("CP1252")
=> "\x92"
works with CP1252 (with UTF8 special char like é wasn't correctly interpreted under MS WORD)
thanks ! :)
Also available in: Atom
PDF