0

I have a a paragraph of text that is sent in with an Lf tag for new lines separating parts, when this is being processed the Lfs end up as CrLF. My issue is that this data is being trimmed down to 4095 characters(database defined char limit) and the vbCrlf seems to be recognized as 1 single character(I did counts before and after the trimming) but 2 distinct characters outside of vb. So for each vbCrLf instance I end up with and extra character more than the supposed limit. I've tried replace the character but I seem to only be able to remove the Lf and attempting to remove the Cr doesn't seem to work. Does anyone have any idea on how I'd be able to remove the Cr and keep the Lf?

Onboardmass
  • 84
  • 3
  • 11

1 Answers1

0

You can use the VBscript replace function to remove the Cr. It should work fine

Replace(TEXT,vbCrLf, VbLf)

vins
  • 15,030
  • 3
  • 36
  • 47
  • This doesn't seem to work for whatever reason. If I try to replace it with a blank or anything else it works, but not specifically doing this, it just leaves it as is. – Onboardmass Apr 26 '16 at 18:54
  • 1
    You have to do it on your whole file, not records. –  Apr 26 '16 at 22:04
  • Is there any particular reason for this? ( Would be undesirable to change all the line endings because I've had issues before because of it) – Onboardmass Apr 27 '16 at 19:56
  • Because it's easy to do. –  Apr 27 '16 at 23:41
  • I've encountered issues when processing the file; eol not being properly registered when uploading after using that method hence I would like an alternative. – Onboardmass Apr 28 '16 at 05:37