Bad CSV files
Before XML, back in the mists of the 20th century people needed a way to get datasets between databases. They came up with a system called CSV:
Comma-Separated Variable (C-S-V)
A file format used primarily to transfer basic data between databases and spreadsheets. Each line (up to the carriage return) is considered a record. Fields within each record are divided by a comma. Each line must have the same number of fields (commas). If a comma or leading and/or trailing blanks appear in any field value the field must be enclosed by quotes (”) to indicate the information is data and not a field divider.
Vodafone and BT now offer online billing - which is nice - and they also provide CSV files to download that contain the bill data. This is even nicer - since you can squirt it into MySQL (or any other DB) and you’ve got a digital record of all your outgoing phone calls.
What’s not so nice is when Vodafone doesn’t create it’s CSV files properly.
Below you will see two views of part of my bill -

This one is from the online bill

This one is the CSV file.
The value that represents the volume of data transferred during a data call contains a comma 15,801 BT. This a problem - because commas define value boundaries - so any DB trying to import the file will get out of sync and split the value into two new values 15 and 801 BT. This then causes all data after this value (in this line) to be put in the wrong field.
Sigh..
The designers of CSV realised that commas in values would cause a problem - so they added the ability to “encapsulate” the values in inverted commas - Then there’s no problem because the computer importing the file knows that since the comma is within the “” marks it does not designate the start of a new value.
Does vodafone encapsulate their values to avoid this? No.
Why can’t big companies - get basic IT right? It makes you wonder how well their complex IT systems are run….
Of course the Vodafone web-site feedback form has no option for feedback about the site its-self.
Comments are closed!