Bug report #8907

unicode not preserved when saving layer attributes as CSV

Added by Geoffrey Fairchild over 10 years ago. Updated over 10 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:17583

Description

I'm using the Natural Earth 1:10m admin 1 states, provinces data (http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_1_states_provinces.zip), and I'm experiencing a unicode export issue. If I export the attributes (save vector layer as), unicode characters are not preserved.

I provide 2 screenshots. The first shows the settings I use to export the data, and the second shows resulting output as displayed in Excel (I sorted the name column).

Screen_Shot_2013-10-18_at_12.25.32_PM.png - export settings (72 KB) Geoffrey Fairchild, 2013-10-18 11:28 AM

Screen_Shot_2013-10-18_at_12.27.26_PM.png - resulting corrupted output in Excel (453 KB) Geoffrey Fairchild, 2013-10-18 11:28 AM

History

#1 Updated by Geoffrey Fairchild over 10 years ago

  • Status changed from Open to Closed

I'm sorry for this. It turns out that this is a problem with Excel. Excel doesn't properly handle UTF-8-encoded CSV files. Opening the CSV file in a proper text editor (like TextWrangler) reveals that the data are indeed correct.

#2 Updated by Giovanni Manghi over 10 years ago

  • Resolution set to invalid

Also available in: Atom PDF