Hi, We are supplied data from an external supplier as csv files. Unfortunately the occasional record in some of the text files has an embedded line feed character in it. This makes loading it into a DB problematic. The supplier isn't able to fix the problem.
I was hoping there was some code I could write that would:
- Load the whole record as 1 string - could be several thousand characters long
- Scan the string for Line Feeds and replace with a space or a dot/full stop.
- I am guessing that this may mean that the record delimiter is damaged ie the CR/LF is left as just CR??
- If that is the case, could the code look for the LF but only do a replace where the character next to the LF is NOT a CR.
Am hoping this makes sense.
Any ideas appreciated.