OpenOffice when exporting CSV underscores are repl

2019-02-23 05:30发布

问题:

I'm having issues with a Open Office. I'm trying to export some files as CSV text and it appears that underscores and perhaps some other characters are being replaced. For instance, I created this file in a text editor and saved it as test.csv:

"this_value","is_replaced"

I then opened the file into Open Office as a spreadsheet. It looked fine. Then I saved it as a new CSV file named test-export.csv. When I open the new file in a text editor, the underscores are replaced with "+AF8-", and the comma is replaced with a tab.

this+AF8-value  is+AF8-replaced

This change makes the file useless for my purposes. Any idea what is causing this?

回答1:

Apparently the problem is caused when you import the CSV file into Open Office. When you import it you have a choice which character set to use. I used UTF-7 when I should have used UTF-8. When I import using UTF-8, it then saves the file as I expect it should.