CSV - 10 years of issues

Hi,


I develop an app where the users can use CSV files to import their contacts, but he have an issue how Numbers change and export the CSV file depending on your language settings.


In some countries they use commas and others use dots, for example:

USA: $12,5

Switzerland: 12.5 CHFs.


So when a user upload our Contact.CSV and open it in Numbers that will automaticaly change the CSV format for his region settings and the separations of the table columns "," ( comma) by " ; " ( dot & coma).

And its will not be able to import his contact in my app and in others one.


Of course we can create a tutorial to show to our users how to go in the settings and change the region settings, but that not always working fine and when you pay the price that a Mac cost that should be work correctly for all the people around this planet. So there the only way for a personn who use Numbers is to not use it and open it in Google Sheet or maybe with this shity Window ( I never tried on a Mac ) to export this file with the correct setting to be import on the web, app or others.


I found on the web some post about this issue WHO ARE OLDER THEN 10 YEARS, it time to do something!

Replies

Your question is not really for the forum, more to Apple and even more those who define CSV…


The problem is that CSV is not very structured, just strings separated by a separator.


Now, if that can help, here is what you could do (I do it in my apps when I use CSV) to mitigate CSV limitations.

Test if the cell is a number, with whatever separator

Then replace by appropriate sign, such as:

USA: $12.5

Switzerland: 12.5 CHFs.



Note: US format is more likely with a dot than a comma


Hope that helps.

If you want Apple to change the behaviour of Numbers, you should file a bug report outlining the problem as it affects your app.

However, I have a question about this:

I develop an app where the users can use CSV files to import their contacts

I’d like to clarify where things go wrong. Reading through your email my best guess is as follows:

  1. You have a user whose locale uses comma as a decimal separator.

  2. They use Numbers to create their list of contacts.

  3. They then export it from Numbers to a CSV file. Because of their locale, Numbers will use a semicolon separator [1].

  4. They then try to import that file into your app, which fails because the file has semicolons rather than comma separators.

Is that right?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

[1] This is common behaviour, as noted in Comma-separated values:

Semicolons are often used in most European countries, such as Italy, France or Spain, instead of commas.