== Preamble ==
In 2015 I've developed just another [[ https://fuel.reyboz.it/ | Italian fuel pumps comparator ]] during a 24H hackaton promoted by a notable Italian insurance company. My team won it but that's not our story.
That tool is based on a dataset provided from the [[ https://en.wikipedia.org/wiki/Ministry_of_Economic_Development_(Italy) | MiSE ]], but that dataset was borked since 2015 and now (2021) it's somehow even //more// borked.
This Task tracks the upstream bug of the MiSE's Open Data dataset.
== Steps to reproduce ==
1. Download the [[ https://www.mise.gov.it/images/exportCSV/anagrafica_impianti_attivi.csv | anagrafica_impianti_attivi.csv ]] from [[ https://www.mise.gov.it/index.php/it/open-data/elenco-dataset/2032336-carburanti-prezzi-praticati-e-anagrafica-degli-impianti | Italian fuel pump dataset - MiSE ]]
2. Open with LibreOffice (set the separator to the semicolon)
3. Note that the dataset is borked at line `29`
Quick overview:
{F1471685}
Alternative quick overview (note line `29`):
{P17, lines=40, highlight=29}
== Problem n. 1 ==
The MiSE is not using a suitable library to generate a CSV.
Please, please, adopt a //real// CSV standard. Do not just use a semicolon as glue for your data.
Instructions:
* https://en.wikipedia.org/wiki/Comma-separated_values on Wikipedia
* https://www.php.net/manual/en/function.fputcsv.php for PHP
* https://pythonspot.com/files-spreadsheets-csv/ for Python
* http://commons.apache.org/proper/commons-csv/ for Java
* ...
== Problem n. 2 ==
The MiSE is not properly validating user input.
Please `trim` your values.
Example: avoid someone called "` Mario Rossi `" (spaces included).
== Problem n. 2 ==
"CSV" means "//comma//-separated values" but MiSE generates //semicolon//-separated values.
I think it's too late to fix this but, hey, I have to report this.
== Proposed solution ==
Adopt whatever CSV library, instead of just using ";" as glue between whatever value.
This will fix a very bad programming approach that is actually compromising their dataset.
== Proposed workaround ==
Contact `MEGA SERVICE S.A.S. DI TERMINI MICHELE &C 123 di Licata, Km. 15+500, LICATA 92023 AG` to fix their data, asking them to remove the `"` from their name.