Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
UltraFormattedTextEditor is replacing Lf with CrLf
posted

I have an UltraFormattedTextEditor and I inserted some text into it that has Lf as it's EOL.  When saved that text back into a file, all of the Lf's had been changed into CrLf's.  How would I prevent this from happening?

Sample code:

UltraTxtFileData.Text = fileData          'fileData has Lf as line terminators

My.Computer.FileSystem.WriteAllText("C:\filedata.txt", UltraTxtFileData.Text, False).   'Line terminators are now CrLf's

  • 29105
    Suggested Answer
    Offline posted

    Hello Brad,

    Thank you for contacting Infragistics. Please refer to my sample attached below to conform or deny if the issue is still happening. Please clarify your steps to isolate the issue and tools used to decipher the issue. From my understanding a line break is treated as a <BR> tag. The sample outputs the text in the editor to a txt file via System.IO and our own personal Word Writer component.

    Let me know if you have any questions.

    6683.WindowsFormsApplication1.zip