Actions
Defect #16432
closedExport CSV : simple quotes replaced by "?" in description
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Affected version:
Description
Hello
When exporting in CSV with descriptions
"'" are replaced by "?"
Files
Updated by Johan Guilbaud over 10 years ago
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
Updated by Jean-Philippe Lang over 10 years ago
- File issues.csv issues.csv added
- Status changed from New to Needs feedback
Works for me (see attached file), can you give more details?
Updated by Johan Guilbaud over 10 years ago
I've just discovered, it's not simple quote ' but a quote ’ (i don't know the name of this quote...)
Updated by Toshi MARUYAMA over 10 years ago
- 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"
Updated by Johan Guilbaud over 10 years ago
works with CP1252 (with UTF8 special char like é wasn't correctly interpreted under MS WORD)
thanks ! :)
Actions