Why does the CSV import, import the Enclosure (ie: the Quote

codamedia
Posts: 7
Joined: 2010-05-19 20:50

Why does the CSV import, import the Enclosure (ie: the Quote

Postby codamedia » 2010-05-19 20:53

I have having a hard time with CSV import.

I am setting the enclosure field as quotes (") but when I import the CSV, it is importing the quotes as well. It shouldn't be doing this. For instance, I am validating an email field, but it won't import because the quotes are showing up around the email address.

It will import a CSV created with EXCEL - because that doesn't enclose anything, but that is also not a true CSV.

Does anyone know why this is happening? How I might be able to fix it.
User avatar
Fred
Site Admin
Posts: 484
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: Why does the CSV import, import the Enclosure (ie: the Q

Postby Fred » 2010-05-20 10:08

Never had that problem.

I assume your CSV is in the following format:
"data block","data block"

With the separator set as a ,
and enclosure as "

Maybe reinstall and re-upload your CVS behaviour?
Fred
eXel content Management Systems (XMS Systems)

Please click the "Accept the Answer" icon if you are happy with the response.
codamedia
Posts: 7
Joined: 2010-05-19 20:50

Re: Why does the CSV import, import the Enclosure (ie: the Q

Postby codamedia » 2010-05-20 12:48

Yes - that is the format I was using and the quotes kept getting imported. I used this extension a lot over the years, and never had this problem.

This particular CSV was being submitted by a large corporation - so I went back to the basics and tried a CSV created myself. That worked fine - so I knew there was something different about the CSV being submitted.

Sure enough - the CSV was in UNICODE rather than ASCII or even UTF-8. A quick conversion of the file made the difference. Not sure why - as I don't fully understand all the differences in character sets - but it worked.
User avatar
Fred
Site Admin
Posts: 484
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: Why does the CSV import, import the Enclosure (ie: the Q

Postby Fred » 2010-05-20 13:37

Open the file in a text editor like notepad and you will see there are extra characters in the file if it is saved in anything other than ASCII.
Fred
eXel content Management Systems (XMS Systems)

Please click the "Accept the Answer" icon if you are happy with the response.

Who is online

Users browsing this forum: No registered users and 0 guests