Open 1e1 opened 6 years ago
Looks good. I just want to create some test cases to check it doesn't break parsing any other csv files before I merge it.
Actually, looks like your data has 4 columns:
3.82251,43.631954,"max @50","GRABELS vers JUVIGNAC \"Avenue de l'Europe\, face \"\"Les Milles et une Choses\""
Column3 = max@50 Column4 = GRABELS vers JUVIGNAC "Avenue de l'Europe, face ""Les Milles et une Choses" (adding escapechar='\' to read_csv() we can remove the escape characters)
Yep! But i'm using a CSV with header. My first line give names: longitude, latitude, name, comment. It works fine ;) I think we can see the comments if we load the POI by Car-Net.
We will currently ignore the 4th column. There isn't a separate field in the database to store the comment (or display it on the satnav). So how would you want the code to handle the 'comment' field? We could just concatenate name & comment.
It is not the issue. The parser failed because it parse the coma between double quotes. It counts 5 fields for this line. But it is initialized with 4 columns.
I thought I have seen a description for embed POI. Perhaps it is Car-Net service.
I have seen a description for embed POI.
Or we should test pPoiSystemTable.personalComment
?
The parser fails because of the escape (\) characters (fixed in 4c7e9493)
pPoiSystemTable.personalComment is used for each category, not for each POI.
Thanks for the update!
We can discuss about pPoiSystemTable.personalComment
in the "documentation" thread:
https://github.com/jimmyH/mypois/issues/10
I had an issue with:
and:
I found the fix on: https://stackoverflow.com/questions/21527057/python-parse-csv-ignoring-comma-with-double-quotes