pd12 / jquery-csv

Automatically exported from code.google.com/p/jquery-csv
MIT License
0 stars 0 forks source link

IE8 not adding null fields #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

in IE9, Firefox, opera etc the data

"Del", "Trotter",, "0123 456 789"

correctly returns:

[1]="Dell"
[2]="Trotter"
[3]=""
[4]="0123 456 789"

but in IE8 it returns

[1]="Dell"
[2]="Trotter"
[3]="0123 456 789"

Original issue reported on code.google.com by danielti...@gmail.com on 2 Oct 2012 at 9:56

GoogleCodeExporter commented 9 years ago
Have you tried the latest release (ie 0.62)? 

Original comment by evanpla...@gmail.com on 3 Oct 2012 at 2:47

GoogleCodeExporter commented 9 years ago
Well, I was successfully able to reproduce the bug.

The one caused by the data set you posted was fixed in 0.62:
  "Del","Trotter",,"0123 456 789"

But there's another elusive one where quoted but empty values get skipped.

That would look like this:
  "Del", "Trotter","", "0123 456 789"

The first step is to pinpoint if your use case still fails in IE8 with the 
latest code. I don't currently have an IE8 environment setup (I run IE9) but I 
have included a null value test in the latest release (0.63) that should 
pinpoint the specific problem. 

What I need from you is to run the test runner and post the results. 
Fortunately, it's very easy.

The link for the test runner is:
http://jquery-csv.googlecode.com/git/test/test.html

With the following data:
"Are you thinking what I\'m thinking?",,"aim for the bushes"
"Are you thinking what I\'m thinking?","","aim for the bushes"

The test should fail with the result:
  [
    [
      "Are you thinking what I'm thinking?",
      "",
      "aim for the bushes"
    ],
    [
      "Are you thinking what I'm thinking?",
      "aim for the bushes"
    ]
  ]

IE. the first entry makes passes but the second one fails because the null 
value is skipped during the parsing phase.

Original comment by evanpla...@gmail.com on 3 Oct 2012 at 5:15

GoogleCodeExporter commented 9 years ago
I just use Virtualbox

Original comment by danielti...@gmail.com on 4 Oct 2012 at 8:57

Attachments:

GoogleCodeExporter commented 9 years ago
OK, that means it's currently working consistently with the rest of the 
browsers.

So, this:

    "Del","Trotter",,"0123 456 789"

Should parse properly in 0.63.

If you were to write it as:

    "Del", "Trotter","","0123 456 789"

It will fail.

*Note: I use VirtualBox too but am too lazy to spend the time setting up a new 
windows image.*

Also, it's a good idea to remove the spaces before/after the commas. They're 
allowed for now but the next parser implementation will throw errors on 'dirty' 
data.

Original comment by evanpla...@gmail.com on 4 Oct 2012 at 1:26

GoogleCodeExporter commented 9 years ago
OK, it's fixed...

It turns out that one of the previous bugfixes needed to skip empty delimited 
matches for a good reason but I neglected to notice that another check was 
needed to add them back in.

If you could run the test runner again to verify that it's working, I would 
appreciate it. Then I'll be able to close this once and for all.

Note: The fix will be incorporated into 0.64 when it's released. Until then you 
can get the working source from the repository. 

Original comment by evanpla...@gmail.com on 6 Oct 2012 at 3:01

GoogleCodeExporter commented 9 years ago
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Tests completed in 221 milliseconds.
11 tests of 11 passed, 0 failed.

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)
Tests completed in 131 milliseconds.
11 tests of 11 passed, 0 failed.

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Tests completed in 132 milliseconds.
11 tests of 11 passed, 0 failed.

Excellent :-)

Original comment by danielti...@gmail.com on 6 Oct 2012 at 10:20

GoogleCodeExporter commented 9 years ago

Original comment by evanpla...@gmail.com on 7 Oct 2012 at 2:55

GoogleCodeExporter commented 9 years ago

Original comment by evanpla...@gmail.com on 11 Oct 2012 at 4:08