Need help on carriage return / line feed...

Hi,
I have a variable defined for a new line, e.g. <CFSET
NewLine = "#chr(13)##chr(10)#">, that I use as a break between
lines of text within CFMAIL.
<CFSET Message = NewLine & "Product Name: " &
Trim(GetProduct.ProductName) & NewLine>
<CFSET Message = Message & "Product Description: "
& Trim(GetProduct.ProductDesc) & NewLine>
<CFSET Message = Message & "Product Color: " &
Trim(GetProduct.ProductColor) & NewLine>
<CFMAIL FROM="[email protected]"
TO="[email protected]" SUBJECT="Product
Info">#Message#</CFMAIL>
If the email is sent to and open up in Microsoft Outlook
account (mailbox), the "Product Description" line of text would
stay on the same line as the Product Name (when
LEN(GetProduct.ProductName) > 50). In other words, the NewLine
variable is not doing the break. The code works with yahoo or
hotmail account though.
Any advice is greatly appreciated.
Thanks in advance!

The trick is to add 3 blank spaces (" " ) at the end of each
line but before the break (NewLine) such as these:
<CFSET NewLine = "#chr(13)##chr(10)#">
<CFSET Message = NewLine & "Product Name: " &
Trim(GetProduct.ProductName) & " " & NewLine>
<CFSET Message = Message & "Product Description: "
& Trim(GetProduct.ProductDesc) & " " & NewLine>
<CFSET Message = Message & "Product Color: " &
Trim(GetProduct.ProductColor) & NewLine>
<CFMAIL FROM="[email protected]"
TO="[email protected]" SUBJECT="Product
Info">#Message#</CFMAIL>

Similar Messages

  • What is escape character for for Carriage Return, Line Feed, Form Feed

    Hi
    I need to a text file which should have following characters
    Carriage Return, Line Feed, Form Feed
    How do i insert them in a string
    i know "\f" is carriage return,
    but what are characters for line feed and form feed
    Ashish

    uncle_alice wrote:
    jverd wrote:
    remus.dragos wrote:
    I forgot that it does not exist in Java. A good thing
    from my point of view.Running the following makes my computer beep.
    public class Bell {
    public static void main(String... args) {
    System.out.println("\u0007");
    Sure, sending a BEL character to the console rings the bell, but that has nothing to do with Java. Anyway, I think he meant Java doesn't support the \a escape sequence in string and char literals.
    >
    >
    >I forgot that it does not exist in Java. A good thing
    from my point of view.
    Running the following makes my computer beep.
    public class Bell {
    public static void main(String... args) {
    System.out.println("\u0007");
    } Sure, sending a BEL character to the console rings the bell, but that has nothing to do with Java. Anyway, I think he meant Java doesn't support the \a escape sequence in string and char literals.
    Ah, I thought he was saying Java doesn't support ringing the bell.

  • How do we remove Carriage Return (line feed) inserted in FCC files

    Hi Experts,
    The file that we generate has a carriage return at the end.
    Is there any way in which we can remove this carriage return (line feed) from the file?
    The FCC parameters used at our end are as below:
    structure.filedNames:
    structure.fieldFixedLengths:
    structure.fixedLengthTooShortHandling: Cut
    Kindly tell us a solution ASAP.
    Thanks & Regards
    Dhwani

    Dear All,
    Let me elaborate on my query
    Consider that the files output looks like below:
    12  34  45  545 5454 UL
    23  33  43  434 4545 FG
    45  44  44  586 6535 GM
    Now there is an extra line(Carriage Return) getting inserted after the last line 45  44  44  586 6535 GM  which is not required at our end.
    The cursor of the file instead of stopping on the last character M, points to the next line.
    Can you please suggest how to remove this extra line from the files.
    I dont understan how will remove context help in this case.
    Regards
    Dhwani

  • XI: Remove Carriage Return +Line Feed at end of XML

    Hi All,
    Scenario
    Currently, we have a JMS --> XI --> IDOC scenario. The Sender Service always sends a CRLF (Carriage Return & Line Feed+) without fail at the end of each xml file once this non-sap system finishes its transaction.
    Example
    <STARTOFXML>
    Data------
    </ENDOFXML>CR+LF
    Question
    Is it possible to remove this from XI JMS Sender Adapter? From the receiver Service (JMS) this is possible.
    Cheers!
    Sulaiman

    Why do you want to remove this? Does this lead to errors?
    Regards
    Stefan

  • Carriage Returns, Line Feeds, and Tabs in Text Area

    I am having users copy and paste data from an Excel spreadsheet into a textarea on a BSP page.  When they submit this, since there are tabs and line feeds in the data, the BSP does not recognize the data.  The value in the field comes through as blank. When I manually type something into this field, with out any carriage returns, tabs, etc., the value does not come through as blank?  Does anybody know how to get around this?

    HI
    Iam uploading the data from application server(AL11) to other server.
    In the GLPCA-SGTXT(Table) iam having some text like 'This is good ##'.i was downloded some other data with this text('This is good ##') by using report program in to aplicationserver(AL11) and from there iam uploading that data into other server.
    But here the problem is in the UNIX, it was showing some problem.
    That is actually it need to show the format like:
    001 256 786 This is good## 459786
    But here it was showing like:
    001 256 786 This is good^M
    459786
    So here '459786' is coming to next line. But i need this '459786' also in the same line.
    I am not sure if it is possible to remove CR and LF's using the code the program is written in, but that is what we need to do.   In Unix  ^M is the CR (Carriage return), but I am not sure what LF is?

  • Carriage Returns & Line Feeds in XML documents

    Does anyone know why the PL/SQL XML parser will NOT work with Carriage Returns (0x0D) within the XML document?
    Currently I'm having to strip them out, leaving just the Line Feed (0x0A).
    I only realised this after looking at the family.xml example document.
    T.I.A.
    Geoff

    I forgot to mention that I'm running Oracle 8i on Windows NT.

  • How to insert a carriage return/line feed in a TextEdit without using wrap

    Hi,
    The string that I want to pass to the textedit is
    "Order Notes : bla bla bla
    Shipping notes : bla bla bla"
    The length of Order notes and shipping notes can vary.
    I am using wrapping. But I need to insert a line feed just before Shipping Notes so it comes on a different line inside the textedit box.
    How do I achieve this?
    Thanks in advance,
    Sachin

    Good thinking, Craig
    I didn't think of this large textarea being present there, just waiting for a question like this ...
    To sum it up for the lazy ones (cause looking at the examples is always worth it, so go do as Craig told ya g!):
    CONCATENATE
    `Order Notes : bla bla bla`
    `Shipping notes : bla bla bla`
    INTO text SEPARATED BY cl_abap_char_utilities=>cr_lf.

  • How to insert a Carriage Return + Line Feed inside a TextView UI element ?

    Hello All,
      Does anyone know how can I achieve the above scenario ? I have a string variable that collects and appeneds text messages from various BAPI calls. At the end of the process, the contents of this variable will be mapped to a textview. Problem is, the length of the string collected is way too long and hence not very readable.  I am not able to find a way to introduce a CRLF after each message is read and appended. Can anyone advise ? Thank you.
    from
    Kwok Wei

    Hi Renjith,
      So far I manage to get find a walk-around to the problem by using the TextEdit as what you have suggested. This works fine... till when you try to print it out. As you see, during printing, I need to remove the vertical scrollbar and ensure that all the text are properly displayed and I do not see any visibleFooter = false option (similar to that of a table) available to the TextEdit.
      If anyone has any suggestions or a more feasible walk around that allows me to print the entire contents in the TextEdit, that will be greatly appreciated
    from
    Kwok Wei

  • Carriage Returns / Line Breaks & PDF

    I have a requirement to display a customers address in 1 column of a PDF report.
    The address is stored in the RPD as Address1, Address2, etc. etc.
    I use the answer of the question "Carriage Returns / Line Breaks" as a basic startup.
    ( Question Registered the 02/24/10 from user12673225 )
    I get a great result in the HTML report.
    But, when I print the report in PDF the HTML control codes appear in the PDF report.
    e.g.
    LTHEA A | P.O. BOX 877 *<br* | KY | VERNON A 100000479 |
    VERNON | /> GRAND...........|....|.............................|
    ...........| CAYMAN.............|....|.............................|
    ...........| KY1-1103 *<br*......|....|.............................|
    ...........| /> CAYMAN.........|....|.............................|
    ...........| ISLANDS.............|....|.............................|
    Presently I generate the report in HTML then I convert it in PDF format.
    Is there a way to print the report directly in PDF without the html control appearing in clear in the pdf file. Is is possible to do the job in one step only?
    Edited by: user9214078 on Feb 24, 2010 11:42 AM

    Hi Will,
    The [   instead of   <  does not work.
    The character "[" is not recognized as an HTLM control code.
    It worth the try.
    Thanks
    Gilles.

  • Carriage return in feed item description?

    As the title says, is it possible to use carriage returns in a podcast feed item description? I'd like my description to list the show topics... something like:
    Show topics:
    1. Topic 1
    2. Topic 2
    Possible? I'm currently using Podcast Maker to generate my feeds. Does that make it any easier or more difficult?
    Aaron

    You can just put a newline character inside the description field and iTunes will show the newline in the Podcast Information Panel (click the "i" button for the episode to see this panel).
    You shouldn't just put a <BR> tag in there though. If you want to put any kind of html tag in the description field, you must either escape them with a &lt; and &gt; tags or
    with a <![CDATA[ ]]>.
    So some field results I found out through experimentation with iTunes:
    First what works:
    - Newline characters work.
    - <BR> works.
    - <![CDATA[line 1<BR>line 2]]> works too.
    What doesn't work:
    - <BR>
    - <BR/> and its escaped forms such as &lt;BR/&gt;
    I'm not sure how other podcast clients will treat the newline character though.
    - Andy Kim
    Potion Factory

  • Read Only TextAreas with Carriage Return, Line Breaks and Word Wrapping

    Hi all,
    I know there are a few posts around this subject but I cannot find the answer to the exact problem I have.
    I have a page that has a 'TextArea with Character Counter' (4000 Chars) that is conditionally read only based on the users credentials (using the 'Read Only' attributes of the TextArea item).
    When the field is editable (not Read Only) everything works fine but when I make the field Read Only I start to have problems:
    The first problem is that the Carriage Return and Line Breaks are ignored and the text becomes one continuos block. I have managed to fix this by adding pre and post element text of pre and /pre tags. This has made the Carriage Return and Line Breaks word nicely and dispaly correctly.
    However, it has introduced a second problem. Long lines, with no Carriage Returns or Line Breaks, now extend to the far right of the page with no word wrapping, making my page potentially 4000+ characters wide.
    How can I get the field to be display only, with recognised Carriage Returns and Line Breaks, and Word Wrapping inside a fixed width of, say, 150 characters?
    Many thanks,
    Martin

    Hi,
    Just a cut and paste of yours with the field name changed:
    htp.p('<script>');
    htp.p('$x("P3_COMMENTS").readonly=true;');
    htp.p('</script>');I also have the following in the page HTML Header, could they be conflicting?
    <script type="text/javascript" language="JavaScript">
    function setReleaseToProd(wpTypeCode){
       //setReleaseToProd($v(this))
      var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=set_release_to_prod',0);
      get.addParam('x01',wpTypeCode);
      gReturn = get.get();
      if(gReturn) {
         $s('P3_RELEASE_TO_PROD',gReturn);
      get = null;
    </script>I am a long way from knowing much about Javascript (this page code was written by someone else) so all help is much appreciated.
    Martin

  • Need to remove carriage returns, spaces, etc.

    Hello,
    I am trying to build a string that is on one line,
    1,2,3,4,5,6,7,8,9
    however, I wind up with each number on a separate line.
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9
    My code looks like this:
    var xxx = "";
    for (var i=1; i<= nNumWords; i++) {
          global.srchVals[i].name = "Payor Mix";
       global.srchVals[i].mode = 0;
       xxx = i;
       if (i < nNumWords) {
       xxx = xxx + ",";
      //xxx = xxx.replace(/\s+/g,"").trim();
      } else {
       xxx = xxx;
       //xxx = xxx.replace(/\s+/g,"").trim();
          var PMItms = [xxx];
       //console.println(xxx);
    I tried using the following line of code to remove carriage returns and spaces:
       xxx = xxx.replace(/\s+/g,"").trim();
    But it keeps on giving me the following error:
    TypeError: xxx.replace(/\s+/g, "").trim is not a function
    Any help is appreciated.
    Thanks
    Linda

    I just want to make sure I'm approaching this problem the correct way.
    I am trying to build a string that is on one line,
    1,2,3,4,5,6,7,8,9
    however, in the debugging console, I wind up with each number on a separate line.
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9
    Will "Trimming" the string correct the issue?
    Thanks
    Linda

  • RTF Template - Multiple Groups, carriage returns/line breaks

    Hello - I developed an .RTF Word template with multiple groups. What I want to do is suppress a group heading and the associated new line generated for that group if the group value is blank. I tried IF statements, but I still see extra white lines in my output. Any idea? I also tried putting NO carriage returns in the Word template, and that didn't work.

    You can use a filter at the group level to check if the group value is blank..
    Something like this example: <?for-each-group:./Listofcity/city[./CityName !=''];CityName?>
    Provide information about your data structure/xml if you need the exact syntax.
    Thanks,
    Bipuser

  • Carriage Returns / Line Breaks

    I have a requirement to display a customers address in 1 column of a report. The address is stored in the RPD as Address1, Address2, etc. etc. Can I create a formula that concatenates the address fields and puts a line break, carriage return after each field?

    Hi,
    I had the same problem as member "user12673225". This worked well if I print the file in HTML, but when I print the file in PDF, the HTML control code appear in the PDF report.
    e.g.
    LTHEA A | P.O. BOX 877 *<br* | KY | VERNON A 100000479 |
    VERNON | /> GRAND...........|....|.............................|
    ...........| CAYMAN.............|....|.............................|
    ...........| KY1-1103 *<br*......|....|.............................|
    ...........| /> CAYMAN.........|....|.............................|
    ...........| ISLANDS.............|....|.............................|
    Presently I generate the report in HTML then I convert it in PDF format.
    Is there a way to print the report directly in PDF without the html control appearing in clear in the pdf, to do the job all in one step?

  • Need help, reading next file line

    i have a file that i am reading using this code, this code reads only string on the first line
    i wnat it to read the second line from the file when the method is called again
    private transactionLine="";
    public void fileReading()
    try
              try
                   FileInputStream finstr = new FileInputStream(userFile);          
              BufferedInputStream bfinstr = new BufferedInputStream(finstr);
              DataInputStream dainsstr = new DataInputStream(bfinstr);
                             transactionLine = dainsstr.readLine();     //holds the transaction line
                             System.out.println(transactionLine);
              catch(FileNotFoundException fnf)
                   System.out.println("File not found");
                   userFile=userInput();
                   fileReading();
                   catch(IOException ioe)
                        System.out.println("io exception at point 1");//point 1

    How big is your file ?
    If it's small file, you can just create a static counter that reads the lines (again and again).
    Else if its a little bigger file, you might want to put it in a vector (once read, always there).
    If its a very large file, then you might work with RandomAccessFile, and you'll have to know how the file is structered.
    ReadFile and ReadFile2 are 2 examples of read the lines, or place in vector.
    good luck!
    import java.io.*;
    public class ReadFile
        private File file = null;
        private static int executed = 0;
        public ReadFile(String fileName)
            //find the file
            File f = new File(fileName);
            if( !f.exists() )
                System.out.println("Cannot find the specified file ( " + fileName + ").");
            else
                this.file = f;
        public String getTransactionLine()
            executed++;
            String line = "";
            if( this.file == null || executed < 1 )
                return line;
            try
                //create a reader
                BufferedReader br = new BufferedReader( new FileReader(file) );
                int counter = 1;
                //read the lines depends on time it been executed
                while( (line=br.readLine())!=null )
                    if( counter++ == executed )
                        break;
                //if exceeded the amount of lines in the file
                if( executed >= counter )
                    line = "Could not read more, the file contains only " + (counter-1) + " lines.";
            catch (Exception ex)
                ex.printStackTrace();
            return line;
        public static void main(String[] args)
            ReadFile rf = new ReadFile("c:\\debugLog.txt");
            //read 1
            String transactionLine = rf.getTransactionLine();
            //output:
            System.out.println(transactionLine);
            //read 2
            transactionLine = rf.getTransactionLine();
            //output:
            System.out.println(transactionLine);
            //read 3
            transactionLine = rf.getTransactionLine();
            //output:
            System.out.println(transactionLine);
            //read 4
            transactionLine = rf.getTransactionLine();
            //output:
            System.out.println(transactionLine);
            //read 5
            transactionLine = rf.getTransactionLine();
            //output:
            System.out.println(transactionLine);
    import java.io.*;
    import java.util.Vector;
    public class ReadFile2
        private static int executed = 0;
        private Vector lines = null;
        public ReadFile2(String fileName)
            //find the file
            File file = new File(fileName);
            if( !file.exists() )
                System.out.println("Cannot find the specified file ( " + fileName + ").");
                return;
            //this vector will contain all lines.
            lines = new Vector();
            try
                //create a reader
                BufferedReader br = new BufferedReader( new FileReader(file) );
                String line = "";
                //read the lines and add them to a vector (lines).
                while( (line=br.readLine())!=null )
                    lines.add(line);
            catch (Exception ex)
                ex.printStackTrace();
        public String getTransactionLine()
            String line = "";
            try
                line = (String) lines.get(executed++);
            catch( Exception ex )
                line = "Could not read more, the file contains only " + (executed-1) + " lines.";
            return line;
        public static void main(String[] args)
            ReadFile2 rf = new ReadFile2("c:\\debugLog.txt");
            //read 1
            String transactionLine = rf.getTransactionLine();
            //output:
            System.out.println(transactionLine);
            //read 2
            transactionLine = rf.getTransactionLine();
            //output:
            System.out.println(transactionLine);
            //read 3
            transactionLine = rf.getTransactionLine();
            //output:
            System.out.println(transactionLine);
            //read 4
            transactionLine = rf.getTransactionLine();
            //output:
            System.out.println(transactionLine);
            //read 5
            transactionLine = rf.getTransactionLine();
            //output:
            System.out.println(transactionLine);
    }

Maybe you are looking for

  • User's custom field for metadata entrance

    It would be wonderful if the user could add a series of metadata custom fields. I'm thinking in a situation where you might be photographing for a national museum or an art gallery where you could enter a custom field for the artist's name, date of b

  • How to PL/SQL Function returns type

    Hello, I need to create a function, which is returning a list of ID's, which is stored in a type T_IDs, something like: function search(searchstring in varchar2) return T_IDs I have a little problem with filling the type inside the function body usin

  • Unable to create a callable object

    Hi All, Try making a Web Dynpro application for CAF GP using this article: [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/composition/caf/how%20to%20integrate%20two%20web%20dynpro%20applications%20using%20composite

  • UOM of PO Quantity cannot be changed

    Hi Experts, I have a requirement to change the UOM (Unit of Measure) of the PO quantity. The UOM has to changed from EA to MON. When I try to do that in the DOC_CHANGE badi, the system reverts back the changes in the PO with a information 'Unit of me

  • CHANGING F1-F12 KEYS BACK TO DEFAULT, THEY CHANGED THEMSELVES AROUND....

    Has anyone had a problem with the F keys changing functions all by themselves? i.e.: my volume keys make the dashboard come up?....how do I fix this..i've had my macbook for 4 days...no clue