Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Saving CSV in UTF-8 on Mac

I am having problems to save a CSV file for Core Data using my Mac, works if I save in Windows computer but not in the MAC. I am using Excel. Every time I run the CSV file saved in MAC there are different errors in the Xcode.

like image 203
Rick Avatar asked Feb 21 '16 14:02

Rick


1 Answers

In my experience when you save CSV files in a Mac computer it is always a mess. I had several problems dug in the forums and realize only could save CSV in PC with windows.
If you are using UTF-8 in your coreData you can workaround with this, I am doing this for some time and never had problem again in my Mac.
The way I do:

  1. Save the .CSV file (comma delimited) in Excel.
  2. Open the .CSV file with (http://www.sublimetext.com/2
  3. File > Save with Encoding > choose the one you want.
  4. Done.

    If you have to edit or open the file in Excel, you have to save in Sublime Text 2 again before you drag to your Xcode project.

    Forget Windows computers :)
    Hope this solve your problem.

like image 123
Manolo Avatar answered Oct 01 '22 00:10

Manolo