Project

General

Profile

Actions

Defect #16432

closed

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

Added by Johan Guilbaud over 10 years ago. Updated over 10 years ago.

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

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

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

Actions #2

Updated by Jean-Philippe Lang over 10 years ago

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

Actions #3

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...)

Actions #4

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" 

Actions #5

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

Also available in: Atom PDF