I want to generate a csv file containing numbers and I want Excel to read that file automatically.
However, Excel uses a different csv format depending on the locale settings. For example:
English:
- Text separator: ,
- Decimal separator: .
Spanish:
- Text separator: ;
- Decimal separator: ,
Is it possible to automatically detect those settings in C++ so I can generate the file according to them?
I know I can obtain the decimal separator using a locale object, but I do not know how to obtain the text separator.
This question is related to: CSV is actually … Semicolon Separated Values . However, I do not want to read the file but to generate it and I want to automatically detect the settings.