Developer Forum [ All Topics | New Topic ]

Thread: Line feed characters in comments section

I noticed that a bunch of feed entries have line feeds (or CRLF) in them that is pushing the entires to span 2 or more lines.  This is causing problems with our diamond updates.  These should all be on one line.

One example in our feed is:

1.500,EGL ISRAEL,,SI2,G,square

eyeclean

girdle inscription,,,,,,58.9,None ,17222273,7.16x6.97x4.10,Good,3050.0000,-0.50,,SAMBA,Radiant,,2857,Good,79.00,1,



>> add a comment
Justin
03/16/2010 02:34


5 Replies:

Hi
Can you send me please your url with parameters


>> add a comment
Samuel
3/17/2010 11:22:00 AM
http://technet.rapaport.com/HTTP/RapLink/download.aspx?SortBy=Owner&White=1&Fancy=1&Programmatically=yes&Version=1.0&UseCheckedCulommns=1&cCT=1&cCERT=1&cCLAR=1&cCOLR=1&cCRTCM=1&cCountry=1&cCITY=1&cCulet=1&cCuletSize=1&cCuletCondition=1&cCUT=1&cDPTH=1&cFLR=1&cGIRDLE=1&cLOTNN=1&cMEAS=1&cPOL=1&cPX=1&cDPX=1&cRapSpec=1&cOWNER=1&cNC=1&cSHP=1&cSTATE=1&cSTOCK_NO=1&cSYM=1&cTBL=1&cSTONES=1&cCertificateImage=1&cCertID=1


>> add a comment
Feed url
3/17/2010 5:00:00 PM
Hi

download page fixed for comment with CRLF


>> add a comment
Samuel
3/18/2010 7:51:00 AM
We're running into the same problem...

Using: 
http://technet.rapaport.com/HTTP/RapLink/download.aspx?CountryIDs=1&SortBy=Owner&White=1&Fancy=1&Programmatically=yes&Version=1.0&UseCheckedCulommns=1&cCT=1&cCERT=1&cCLAR=1&cCOLR=1&cCRTCM=1&cCountry=1&cCITY=1&cCulet=1&cCuletSize=1&cCuletCondition=1&cCUT=1&cDPTH=1&cFLR=1&cGIRDLE=1&cLOTNN=1&cMEAS=1&cPOL=1&cPX=1&cDPX=1&cRapSpec=1&cOWNER=1&cAct=1&cNC=1&cSHP=1&cSTATE=1&cSTOCK_NO=1&cSYM=1&cTBL=1&cSTONES=1&cCertificateImage=1&cCertID=1

to download a CSV file, numerous entries have line breaks within the comments, and this causes the import into our local database to fail on multiple records, since the column count gets screwed up.

We're trying to find a regular expression that will remove the returns only from within quoted fields, but that's getting into truly ugly regex territory. 

It would be nice if the returns could be encoded somehow before the CSV file is returned. 

Any suggestions for how to handle this otherwise?


>> add a comment
Spud
5/13/2010 12:36:00 PM
Please disregard the earlier post...after much wrangling with various import/parsing strategies, we finally hit upon a use of PHP's "fgetcsv" that works like a champ.

Cheers.


>> add a comment
Spud
5/13/2010 2:18:00 PM