Does ColdFusion CR / LF include Wrap?

I need to do word wrap with several considerations:

  1. MS WORD Source File

  2. Copy and paste the text into the textbox in cfform.

  3. Use

    #wrap (theTextVar, 80) #
    to display 80 characters
  4. The text is loaded into a legacy system that requires loading ANSI or ASCII characters.

Everything seems to work well, I just wanted to make sure that someone else is lucky enough to know if CR / LF is being entered after each line in the output text (Step 3)?

+2


a source to share


2 answers


From the docs on wrap ():

Uses the operating system specific line break: newline for UNIX, transport return and newline for Windows.



So, if you are doing this in a Windows box, then the answer is yes.

+1


a source


Have you tried this?



<cffile action="write" file="i_will_show_the_secret_if_you_open_me_in_text_editor.html" output="#wrap(theTextVar,80)#" />

      

+1


a source







All Articles