csvHtml5 breaks CSV with Zero length non-breaking space as very first character

csvHtml5 breaks CSV with Zero length non-breaking space as very first character

drewbertoladrewbertola Posts: 1Questions: 0Answers: 0

Hi,

I'm noticing that when I export a CSV with the csvHtml5 export button, There is a character entity of "" injected just before the first columns heading (e.g. the first character of the file). This breaks the CSV format for our upstream work flow. Any ideas why this is and whether it is a bug?

It is replicated in this js fiddle

https://jsfiddle.net/e0sf7u8s/4/

This example uses minimal plugins, but the effect is still there in the exported CSV. To detect the extraneous character, use an editor like gedit. You'll notice that you need two right arrow clicks to go to the right of the first quote on line 1. The zero-length non-breaking character is there (but not visually noticeable). It can be deleted by going to the beginning of the line, hit right arrow once, then backspace (or just Delete). The first quote is still there.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Thanks for the example!

    There is a character entity of "" injected just before the first columns heading (e.g. the first character of the file).

    That is the UTF8 BOM. I committed a change to disable it by default just last week and that will be included in the next release. It is currently in the nightly if you want to try it.

    Allan

This discussion has been closed.