Defect #16432

Export CSV : simple quotes replaced by "?" in description

Added by Johan Guilbaud almost 8 years ago. Updated almost 8 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:Invalid Affected version:

Description

Hello
When exporting in CSV with descriptions
"'" are replaced by "?"

issues.csv Magnifier (143 Bytes) Jean-Philippe Lang, 2014-04-06 13:14

History

#1 Updated by Johan Guilbaud almost 8 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

#2 Updated by Jean-Philippe Lang almost 8 years ago

  • File issues.csvMagnifier added
  • Status changed from New to Needs feedback

Works for me (see attached file), can you give more details?

#3 Updated by Johan Guilbaud almost 8 years ago

I've just discovered, it's not simple quote ' but a quote ’ (i don't know the name of this quote...)

#4 Updated by Toshi MARUYAMA almost 8 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" 

#5 Updated by Johan Guilbaud almost 8 years ago

works with CP1252 (with UTF8 special char like é wasn't correctly interpreted under MS WORD)

thanks ! :)

Also available in: Atom PDF