Adding a newline character in concat method

I am trying to create a txt file in UNIX environment and building a string using concat method.  The requirement is to insert a new line between the string value.  I tried the following but nothing seems to work.
concat("FirstLine","\n","SecondLine);
concat("FirstLine","\\n","SecondLine);
concat("FirstLine","/\n","SecondLine);
concat("FirstLine","&#xA","SecondLine);
concat("FirstLine","&#x0A","SecondLine);
concat("FirstLine","&#xD","SecondLine);
concat("FirstLine","&#x0D","SecondLine);
concat("FirstLine",CHAR(10),"SecondLine);
concat("FirstLine",Char(10),"SecondLine);
attempts 1-7 concatenated the string into only one line.  Attempts 8,9 threw an error saying "CHAR" or "Char" is not a valid method.  Can anyone help me out with this?
Thanks a lot

Hi Steven,
regarding the "add new line!" see forum:
http://forums.adobe.com/thread/960612?tstart=0
I tried many different options, and the most consistent was to go the executeScript way.
Make a resuable component or something like that.
hope it helps...

Similar Messages

  • Newline character in file

    Hi All,
    I am writing my output to a file .....
    I want to write the subsequent outputs to the same file accompanied by newline character...
    How do i do that?

    Use a PrintStream (or its equivalent Writer) and let the println()
    method do its job, i.e. it will print the correct newline combination
    depending on your platform. If you must do it yourself have a look at
    the System.getProperty("line.separator") property.
    kind regards,
    Jos

  • Getting the newLine character when deleting a line...

    I have a JTextArea that has a custom DocumentListener added. What I want is to be notified when the user hits enter for a new line and be notified when the user removes a line. Getting the newLine when the user hits enter is easy enough, however the reverse is not true. Whenever backspace is pressed it gets the same removeLine character, which is not what I want, because a backspace is not a removeLine( or newLine) character. Here is my code so far...
              public void insertUpdate(DocumentEvent e){
                   Document d = e.getDocument();
                   try {
                        String s = d.getText(e.getOffset(), e.getLength());
                        System.out.println("got a line");
                   } catch (BadLocationException e2) {
                        e2.printStackTrace();
              public void removeUpdate(DocumentEvent e){
                   Document d = e.getDocument();
                   try {
                        String s = d.getText(e.getOffset(), e.getLength());
                        if(s.equals("\n"))
                             System.out.println("removed a line");
                   } catch (BadLocationException e2) {
                        e2.printStackTrace();
              };It's in the removeUpdate that my code is flawed. Can anyone stear me in the right direction?

    What for?By definition when you have a problem, you don't know what the problem or solution is. So you post a SSCCE showing what you've attempted so far so that we can see the problem you are describing.
    Since you also don't know how to ask a very clear question. The SSCCE help in describing the problem. Maybe it won't help in this case, but you don't know that before hand. So you get in the habbit of always posting a SSCCE.
    You talk about removing a line, but I don't know what that means. What happens if you data in a text area like:
    123
    456
    789
    To me removing a line means removing "123\n" to that the entire line is removed from the file. Or what happens if you select 3 and 7 with the mouse and then use the "Delete" key? Did you remove 1 line or 2 lines. Are you trying to count the number of "\n" characters that have been removed. Or do you only care about the backspace key because that was a concious decision or did you just not think about all the other possibilities of how text can be removed from a Document?
    So as you can see you question is not a simple and straight forward as you thought. Without a SSCCE to clarify exactly what you are doing we can only provide half an answer.
    You can find the answer by reading the Swing tutorial. Maybe the section on Key Bindings, if you just want to know when a certain key was pressed. Or maybe the section on a DocumentFilter if you want to know what text has actually been added or removed from the Document (before it happens).

  • TCP Callback on Newline Character

    I have a TCP connection to a device that sends its short message (< 100 characters) in chunks.  Unfortunately these chunks seem to be random.  I am having some difficulty tokenizing the data and getting it into five floats.  Is there any way I can make this TCP callback fire only when a newline character is received, or a better method of putting the message together?  I'm going to be dealing with much larger TCP messages for other devices, so it will be good to get this issue resolved on a small scale problem.
    For whatever reason, my logic is allowing incomplete messages to be tokenized.  The message leads with BARO and ends with \r\n.
                        receiveBuf[dataSize] = '\0';
                        if (strstr(receiveBuf,"\n") == NULL)
                            strcpy(Vaisala.Message, receiveBuf);
                        else
                            if ((strlen(Vaisala.Message) + strlen(receiveBuf) < 100) || (strstr(receiveBuf,"BARO") == NULL))
                                strcat(Vaisala.Message, receiveBuf);
                                Vaisala.Message[strlen(Vaisala.Message) - 2] = '\0';
                                token = strtok(Vaisala.Message, "\t");
                                token = strtok(NULL, "\t");                              
                                Vaisala.Barometric = atof(token);
                                token = strtok(NULL, "\t");  
                                token = strtok(NULL, "\t");                              
                                Vaisala.DryBulb = atof(token);
                                token = strtok(NULL, "\t");  
                                token = strtok(NULL, "\t");                              
                                Vaisala.WetBulb = atof(token);
                                token = strtok(NULL, "\t");  
                                token = strtok(NULL, "\t");                              
                                Vaisala.Dewpoint = atof(token);
                                token = strtok(NULL, "\t");  
                                token = strtok(NULL, "\t");                              
                                Vaisala.RH = atof(token);
                            else
                                memset(Vaisala.Message, '\0', 100);
    Michael Chadwell
    Department of Engine and Vehicle R&D
    Southwest Research Institute

    I found a workaround that I don't like. 
    1. If the message starts with B, start a new string.
    2. If the message does not have \n, concatenate the message.
    3. If the message has a \n, parse the data.
    Seems to work well but I won't always have such fixed strings so I'd like a callback that fires when the \n is received.
             case TCP_DATAREADY:
                if ((dataSize = ClientTCPRead (VaisalaTCPConnectionHandle, receiveBuf, dataSize, 1000)) < 0)
                    // Error
                else
                        receiveBuf[dataSize] = '\0';
                        if ((strstr(receiveBuf,"\n") == NULL) && (receiveBuf[0] == 'B'))
                            strcpy(Vaisala.Message, receiveBuf);
                        else if (strstr(receiveBuf,"\n") == NULL)
                            strcat(Vaisala.Message, receiveBuf);             
                        else
                            if ((strlen(Vaisala.Message) + strlen(receiveBuf) < 100) || (strstr(receiveBuf,"BARO") == NULL))
                                strcat(Vaisala.Message, receiveBuf);
                                Vaisala.Message[strlen(Vaisala.Message) - 2] = '\0';
                                token = strtok(Vaisala.Message, "\t");
                                token = strtok(NULL, "\t");                              
                                Vaisala.Barometric = atof(token);
                                token = strtok(NULL, "\t");  
                                token = strtok(NULL, "\t");                              
                                Vaisala.RH = atof(token);
                                token = strtok(NULL, "\t");  
                                token = strtok(NULL, "\t");                              
                                Vaisala.Dewpoint = atof(token);
                                token = strtok(NULL, "\t");  
                                token = strtok(NULL, "\t");                              
                                Vaisala.DryBulb = atof(token);
                                token = strtok(NULL, "\t");  
                                token = strtok(NULL, "\t");                              
                                Vaisala.WetBulb = atof(token);
                            else
                                memset(Vaisala.Message, '\0', 100);
                    // Process data here
                break;
    Michael Chadwell
    Department of Engine and Vehicle R&D
    Southwest Research Institute
    Attachments:
    Serial.jpg ‏105 KB

  • Lyrics on ipod touch: newline character?

    Is there a newline character for lyrics to allow me to separate stanzas when displayed on ipod touch?
    Right now all the lines (and thus stanzas) are running together.

    Step by step:
    In iTunes, have you added the lyrics to each individual song and in the lyrics tab of the song?
    If you use Sync to manage your iPod, have you then Synced your iPod after adding the lyrics?
    If you manually mange the iPod, you need to remove the album from the iPod and then add it back again (with the lyrics)
    If you still have no luck, then if you use Sync, try typing anything into the lyrics field of any song. Then after a Sync with the iPod, check that song. When you can see the scrubber bar (with the time), you should be able to see the text you typed.
    If you manually manage the iPod, remove one song from the iPod, add some text to that song and then add it back onto the iPod and play it. Can you see the lyrics now?
    If none of that works, perhaps the iPod need a Reset or a Restore.

  • How to escape newline character(nl) in file content conversion parameter?

    Hi Experts,
    How to escape newline character(nl) in file content conversion parameter?
    For example:
    field1field2field3
    field4field5field6
    Means Item is splitted in two lines.
    I want to SKIP new line character
    and to collect all SIX fields.
    What will be the file content conversion parameter?
    Thanks in Advance..........

    Hi,
    as far as i know there is nothing in the standard. But the question is why dont you combine at mapping the fields into only structure?
    Regards,
    Udo

  • File format for newline character

    Hi there, I have a scenario to do. From IDOC to flat file. I receive a number of idocs and must convert them into a flat file. Each idoc must start on a new line. Each line represents a new record. I have done this and it works fine. But now the system reading the flat file is having trouble with the newline character. Im using ABAP mapping to create the flat file and the newline characters I tried are
    l_crlf(2) VALUE %_cr_lf
    l_crlf(1) VALUE %_NEWLINE
    Lest say I open the flatfile in MS Word and do a character count it shows as 100 char's but on there system it shows as 101. It has something to do with the file format..
    Does anyone know how to fix this?
    Thanx,
    Jan

    It turnes out that their file encoding was not the same as ours so I just changes the file type brom binary to text and set the encoding to UTF-8
    Thanx,
    Jan

  • How to remove the newline character at the start in the attachment ?

    Hi All,
    I have been trying to attach a .dat file generated at an external source and send it as an attachment by mail using UTL_SMTP, all things are working but the .dat file which comes attached in mail contains a newline character i.e. chr(10) at the start line and the contents of the file are written from second line onwards. Below is some part of the code which deals with read/write of attachment of mail to be sent.
    Can anyone help me on this, is something to be changed in this code??
    UTL_SMTP.write_data(c,
    'Subject' || ': ' || P_SUBJECT || UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    'MIME-Version: 1.0' || UTL_TCP.crlf || -- Use MIME mail standard
    'Content-Type: multipart/mixed;' || UTL_TCP.crlf ||
    ' boundary="-----SECBOUND"' || UTL_TCP.crlf ||
    UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    '-------SECBOUND' || UTL_TCP.crlf ||
    'Content-Type: text/plain;' || UTL_TCP.crlf ||
    'Content-Transfer_Encoding: 7bit' || UTL_TCP.crlf ||
    UTL_TCP.crlf);
    UTL_SMTP.write_data(c, UTL_TCP.crlf || l_text);
    UTL_SMTP.write_data(c, UTL_TCP.crlf);
    UTL_SMTP.write_data(c, UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    '-------SECBOUND' || UTL_TCP.crlf ||
    'Content-Type: text/plain;' || UTL_TCP.crlf ||
    ' name="/inetpub/wwwroot/Novation_Merge/FS_Extract.dat"' ||
    UTL_TCP.crlf ||
    'Content-Transfer_Encoding: 8bit' || UTL_TCP.crlf ||
    'Content-Disposition: attachment;' ||UTL_TCP.crlf || ' filename="' || p_description ||
    TO_CHAR(SYSDATE, 'DD-MON-YYYY') || '.dat"' ||
    UTL_TCP.crlf || UTL_TCP.crlf ||UTL_TCP.crlf);
    BEGIN
    l_filehandle := UTL_FILE.fopen('c:\temp',
    'FS_Extract.dat',
    'r',
    32767);
    LOOP
    UTL_FILE.GET_LINE(l_filehandle, l_buffer, 32767);
    UTL_SMTP.write_data(c, l_buffer || UTL_TCP.crlf);
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    UTL_FILE.fclose(l_filehandle);
    UTL_SMTP.write_data(c, '-------SECBOUND--');
    UTL_SMTP.close_data(c);
    UTL_SMTP.quit(c);
    EXCEPTION
    WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error THEN
    BEGIN
    UTL_SMTP.quit(c);
    EXCEPTION
    WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error THEN
    NULL;
    -- When the SMTP server is down or unavailable, we don't have
    -- a connection to the server. The quit call will raise an
    -- exception that we can ignore.
    END;
    RAISE_APPLICATION_ERROR(-20000,
    'Failed to send mail due to the following error: ' ||
    SQLERRM);
    END;
    Thanks,
    -Amol

    As I recall, a single blank line serves as separator between Mime Header and Mime Body.
    This code..
    UTL_SMTP.write_data(c,
      '-------SECBOUND' || UTL_TCP.crlf ||
      'Content-Type: text/plain;' || UTL_TCP.crlf ||
      ' name="/inetpub/wwwroot/Novation_Merge/FS_Extract.dat"' ||
      UTL_TCP.crlf ||
      'Content-Transfer_Encoding: 8bit' || UTL_TCP.crlf ||
      'Content-Disposition: attachment;' ||UTL_TCP.crlf || ' filename="' || p_description ||
      TO_CHAR(SYSDATE, 'DD-MON-YYYY') || '.dat"' ||
      UTL_TCP.crlf || UTL_TCP.crlf ||UTL_TCP.crlf);  ..generates 2 blank lines after the Mime Header.
    Remove the last CRLF and see if that does the trick.

  • External table and newline character

    I have an external table which is just a csv file, records delimited by newline and fields terminated by ','. However, the last column has a newline character appended to it. Is there an option in the external table syntax which will trim this?

    Try setting 'REJECT ROWS WITH ALL NULL FIELDS'
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch12.htm#1011062

  • Newline character in a String

    Hi,
    How can i introduce a newline character while displaying a string using string functions in a report..
    My requirement is, i need to replace a particular character with a newline character in a string using replace function
    Can anyone help me
    Thanks in advance..

    Hi,
    Try this,
    REPLACE(Table.ColumnName, 'StringOrCharacterToReplace', '[br]')
    *replace [ and ] with < and > in br tag. Change the data format of the column to HTML
    Rgds,
    Dpka

  • Is is standard for JSP to output every newline character it sees?

    I've encountered a very annoying problem using JSP. It seems JSPC outputs every newline character it sees in the JSP page -- even if it is after a JSP comment or JSP directive. Look at the sample JSP at the bottom: it will output 4 blank lines (3 from comments + 1 from directive) before it prints "JSP Body Line 1". Granted, this is not a big problem if the content is HTML and will be viewed in a browser. However, my content has to be plain text because the client in my case is not always a browser.
    I've tested this on both JRun and TomCat. Same results. I don't understand why is this, because intuitively the JSP designer would not have meant to output those blank lines, right? I'm wondering if this is really an "official" behavior prescribed by the JSP standard, or just an oversight in JRun and TomCat? Could any expert help me verify this in JSP standard (by the way, which one is the official document that spells out the JSPC implementation?) or anyone help me test it in other App Server (e.g. WebLogic, WebSphere, etc.) which I don't have access to? Your help is greatly appreciated!
    ======= Sample JSP code ========
    <%-- JSP Comment Line 1 --%>
    <%-- JSP Comment Line 2 --%>
    <%-- JSP Comment Line 3 --%>
    <@ page contentType="text/plain" %>
    JSP Body Line 1
    JSP Body Line 2
    ...

    The truth is, newlines (as far as HTML or most XML is concerned) are just any old kind of whitespace. An extra line or two isn't a major problem, the only time this will really cripple you is if you want to insert scriptlets above the <?xml...> line.

  • How to remove a newline character from a column

    hi all...
    i have a column in a table in which some of the datas contain a newline character at their last.
    i need to remove those newline characters.
    for example.... a data is
    'abcd
    (notice the end of the quotation).....i need to get the data as...'abcd'
    plss help me...
    thanks in advance..

    thanks for ur reply...
    i got your point..but here what you have done is....u have inserted a particular character set in between 'abcd' and 'xyz' and afetr that just replaced those character set by null....
    but in my case the problem is a bit different...
    the datas are already present and what i have to do is to remove the newline spaces from the end of the datas.
    select replace(column_name,'<what shall i put here>',null) from table_name;
    in your example...that is 'chr(10)'...but in my case its a newline character....

  • NewLine Character in the String received from Interactive Adobe Form

    Hello Experts,
    Following is the issue we have with interactive Adobe Form
    We have a text area within the form. User enters the text in multiple lines in this text area.
    We are calling a backend function module designed in SE37 that accepts and process the data from the adobe form.  We are also processing the string data user enters in the text area.
    When we receive the string from the form, the newline character within the string is displayed as '#' in the debugger. We tried splitting this string using cl_abap_char_utilities=>newline and cl_abap_char_utilities=>cr_lf  but NO luck. Though in the debugger we see cl_abap_char_utilities=>newline  as '#'  in the debugger and also '#' is present within the string, for some reason when string is processed to find cl_abap_char_utilities=>newline, we can find/locate it.
    Because ABAP code is not able to identify the newline character within the string received from Adobe form, we are not able to maintain the formatting of the string as it was entered in the form.
    Any help to resolve this issue is appreciated.
    Thanks in Advance.
    Regards,
    Bhushan

    Hi Bhushan,
    I was going through your issue, and I feel this is something you can do with scripting. Basically you should read whole string and find the new line character and replace with a space or comma, as per your requirment.
    Do like following:
    In the exit event of the field select java script and write following code:
    var strng = this.rawValue;
    strng.replace(/\n/g, " ");
    above im reaplcing new line with a space.
    I think it should work I have not tested it. Pls update if you test it .
    Regards,
    Ravi.D

  • Remove last newline character

    How can I remove the newline character only from the very end
    of a string? (Note there are several newline characters within the
    string). Thanks!

    How long is the string and roughly how many newline
    characters are there? One way, although kinda funky, would be to
    convert the newline-delimited list to an array, and then convert it
    back. See below.

  • Inserting newline character  in header in messageformat class

    i've to print 5 lines in header.i've created header using messageformat class.But the newline character not working.(paper size:width=4in)please help.

    Thanx for ur reply.
    i've to print a jtable.i couldn't change font size and also no. of lines for headers.i want the font size same as that of the footer.
    here is my code
    jtable.print(printmode,headerformat,footerformat,null, false, null)

Maybe you are looking for

  • Error when i create accounting

    frist of all sorry if i put this message in wrong subject or wrong thread.this is my frist time in forum dear all, i use ebs r12 12.1.2 os Linux x86-64 when i create accounting i meet error this log : Application Object Library: Version : 12.0.0 Copy

  • Hyper-V LBFO Teaming VMQ RSS-settings

    Hi, We are running a six host Hyper-V Cluster on 2012 R2 Core machines. Since the environment was set up we have been receiving the following error: Source: Hyper-V-VmSwitch Event ID: 106 Description: Available processor sets of the underlying physic

  • How do I turn a large poster into a small PDF?

    I made an academic poster in Pages (about 4' x 3') but now i need to save it as a PDF to send out.  Both printing as a PDF and exporting as a PDF look horrible, so I am following previous advice and saving it as a PostScript and then opening in Previ

  • Dwg files opening blank in CS4

    I have two .dwg files that were emailed to me and are opening up as a blank screen in AI CS4.  I've never had a problem opening .dwg files before.  They are both drawings produced in ProE.  Any thoughts/suggestions on how I can get these files to ope

  • Accessing Oracle8i lite on a WinCE with Java?

    Hi guys, I would like to develop a data collection application in Java on a CE device. I'd like to write the data capture App in Java. as a first cut, I've build a test app that stores its data via Serialisation. I could retrieve the data using RMI.