New Line Character problem in mail attachment

Hi all,
my xi-box is in patch level 16. i need to send the mapped xml as a pipe delimited file(a lineitem per line) attachment to a mail id. so i use MTB to content convert the payload and attach the content as an attachment using a custom module and send the mail. Since the naming convention of the attachment (as per my requirement) says the file should be a .txt file, i 've used text/plain as the content-type.
if i open the attachment in textpad or wordpad i can see one lineitem per line; but if i open it with notepad its not the case.lineitems do not appear in separate lines but appear continuously. i 'm seeing a box character as a separator between the lineitems. i'm not able to figure it out why.
i used MTB in file adapter and content converted the payload and opened the file in notepad;it was fine.
But i'm not able to figure out why its happening with the mail attachment. If you have come across such a problem please suggest me to solve this.
Regards,
Sundararamaprasad

Is there any way you can send the file in an ASCII format instead of BINARY format. In many of my resolved cases I just change from binary to ascii and it works for eg., while doing FTP.
thansk,
rakesh

Similar Messages

  • Problem with new-line-character and java.io.LineNumberReader under AIX

    Hi folks,
    I got the following problem: I wrote a little parser that reads in a plain-text, tabulator-separated, line-formatted logfile (and later on safes the data to a 2-dimensional Vector). This logfile was originally generated by an AIX ksh script, however, I copied it on my Windows machine to work with it (for I'm using a Java editor that runs under Win Systems).
    For any reason, Windows, and what is worse Java too, seems not to recognize correctly the new-line character (in the API it is written that this should be a newline '\n' or a carriage-return '\r' or one followed by the other) that marks the end of a line in the logfile.
    Also, when I'm opening the logfile with the "Notepad"-editor, this special character does not seem to be recognized, every line is inserted right after the other.
    On the other side, when I open the logfile with the built-in editor in the CMD-Shell ("Dos-shell"), the newline chars seem to be recognized correctly.
    But when start my parser on the AIX-machine the newline does not seem to be recognized correctly again.
    I tried to read in the logfile with MS-Excel and safe it as a plain-text, tabulator-separated, line-formatted logfile again, with such files my parser works fine both on the AIX as it does on Windows.
    Any ideas? Anybody got over the same problem already?
    Greetz FK

    Under windows, text files' lines are usually delimited by \r\n,
    under Unix/Linux/AIX etc. \n
    and under Mac \r.
    I recommend to use the following editors, which are capable to handle files with Unix and Windows-styled line-delimiters or convert between these types:
    Programmer's File Editor (PFE; available on Windows)
    The Nirvana Editor (http://www.nedit.org/; available on Unix, MAcOS, Windows)
    (BTW good old vim can handle that too. Transferring text files to windows in order to edit them, even using Excel for this purpose means your being a UNIX newbie, (I mean no offense by writing this) so vim is probably beyond your reach for the moment.)
    Java normally assumes the platform's line delimiters where it is running, so if you transferred the file from Unix to Windows might be distrurbing.

  • Problem is occurring in docx format; it is not printing "New Line" character in extracted txt using IFilter (offfiltx.dll) while with doc file IFilter (OffFilt.dll) is working fine.

    Problem: Problem
    is occurring in docx format; it is not printing “New Line” character in extracted txt using IFilter (offfiltx.dll) while with doc file IFilter (OffFilt.dll) is working fine.
    Environment: -
    Operating
    System:
    Windows XP SP2/7
    Language:
    C#
    MS
    Office Version: - MS Office 2007/2010/2013
    Problem
    Description: -
    We
    havedocx
    file with new line character, and we are processing this file in IFilter for extracting text, and it is giving output with concatenation of lines.
    Docx
    file format (Sample.docx)
    Test this music
    Word processing
    Testing docx file
    Output:
    - Test this music Word processing Testing docx file
    Requirement:
    - We
    have requirement to get following text in particular format with New Line from docx because client is using docx format only.
    Test this music
    Word processing
    Testing docx file
    Attempt:
    We have tried a lot after changing IFilter configuration,
    but it is not giving required output. Then we saved same file in doc format (Sample.doc), which is giving required output.
    Because it is application specific problem, kindly
    assist to resolve issue on priority. We are sharing IFilter paths for extracting text for doc and docx.
    Doc Filter Location: - %systemroot%\system32\OffFilt.dll
    Docx Filter Location: - <Drive>:\PROGRA~1\COMMON~1\MICROS~1\Filters\offfiltx.dll
    Code Snippet for setting property of filter
    internal static IFilter LoadAndInitIFilter(string fileName, string extension)
                IFilter filter
    = LoadIFilter(extension);
                if (filter
    == null)
                    return null;
                IPersistFile persistFile
    = (filter as IPersistFile);
                if (persistFile
    != null)
    persistFile.Load(fileName, 0);
                    IFILTER_FLAGS flags;
                    IFILTER_INIT iflags
    =
                                IFILTER_INIT.CANON_HYPHENS
    |
                                IFILTER_INIT.CANON_PARAGRAPHS
    |
                                IFILTER_INIT.CANON_SPACES
    |
                                IFILTER_INIT.APPLY_INDEX_ATTRIBUTES
    |
                                IFILTER_INIT.HARD_LINE_BREAKS
    |
                                IFILTER_INIT.FILTER_OWNED_VALUE_OK;
                    if (filter.Init(iflags,
    0, IntPtr.Zero, out flags)
    ==IFilterReturnCode.S_OK)
                        return filter;
                Marshal.ReleaseComObject(filter);
                return null;
    Kindly
    assist to resolve this issue and also let us know if any input is required.
    For any help, we would be really
    thankful.

    Kindly
    assist to resolve this issue and also let us know if any input is required.
    For any help, we
    would be really thankful.

  • Problem with CDATA and new line character

    I parse a xml document with org.w3c.dom, the document contain a CDATA section in which there are more lines of text, each line is terminated with the new line character (\n).
    Example:
    <nota>
    <[CDATA[
    first line
    second line
    third line
    ]]>
    </nota>
    When a parse this node:
    Text txt_nota=(Text)elm_nota.getFirstChild();
    String nota=txt_nota.getData();
    the value returned is one string with no new line characters, example:
    "first linesecond linethird line"
    what's wrong?

    Because i use the string nota into a jsp page and i print the string nota into a textarea and the text is with no newline, example:
    <textarea name="nota" rows="4" cols="60"><%= nota %></textarea>
    the text into textarea is:
    first linesecond linethird line
    but i want that the text displayed into textarea is equal the text into the CDATA section:
    first line
    second line
    third line

  • Insert and retrieve new line character in DB2

    Hi,
    I have a requirement in my project where I need to generate flat files to be sent to the bank for validation and for each record type in the flat file, I want to have a line separator inserted in the file. Now, the line seperator is configurable as a system option as per customers needs which is stored in the database (we are using DB2). Even though, I inserted '\n' (New line character) in the system option as a line separator, while retrieving from database through JDBC and appending to the flat file, it is not recognizing it as a new line character and simply appends '\n\ in the flat file.
    Please suggest any solution for this.

    >
    Why with notepad I don't see 1 record per line? how to solve this problem?
    Hi,
    this is the problem, seems so clear.
    To use wordpad as standard editor is not an answer, neither for me, nor for other people who receives mail.
    No solution is a better answer.
    Best Regards
    Fabio Boni
    Edited by: Fabio Boni on Sep 6, 2010 10:46 AM
    Edited by: Fabio Boni on Sep 6, 2010 10:47 AM

  • Need help in how to print new line character in unix using java

    Hi All,
    I use the printstream class to print some line in a text using java.
    here is the code:
       FileOutputStream out; // declare a file output object
            PrintStream p; // declare a print stream object
                    p.print("\t");
                    p.print(date);
                    p.print("\t\t");
                    p.print(RecCount);
                    p.println("\n");when i use this and output of this character in windows is
    date RecCount
    22-07-2007 23456
    when i use the same code in unix it shows the following output:
    date RecCount[]22-07-2007
    it wont accept the new line character could any one give me an idea to solve this problem.

    PrintStream has a println() method. Use that. Or System.getProperty("line.separator").
    Because a newline char doesn't necessarily specify a line break. It's system-dependent.

  • How to insert new line character?

    Hi all,
    I have two lines to print.
    out.println("Available number of columns="+cols);
    out.println("Number of columns must be present=10");My problem is:
    i want both the lines to be printed one below the other. But, it is displayed in one single line.....
    Can anyone please tell me how to insert new line character?
    I tried with \n, '\n' and \r\n but, in vain......
    Thanks for your time.
    Regards,
    Ashvini

    You should never use "\n" directly.
    The line separator character is different on different operating systems.
    And putting quotes around it in your string will make absolutely no difference in the JSP.
    To find out what the line separator is you should use System.getProperty("line.separator");
    The JSPWriter and PrintWriter classes will automatically use this property with a println statement, so a println will always finish with a line separator.
    The issue here was that HTML by default ignores all whitespace.
    The solutions provided
    - use a <br> tag instead of a carriage return
    - use <pre> tags, which tells the browser not to ignore whitespace. That can be troublesome in JSP which generates a lot of extraneous carriage returns into the code.
    Cheers,
    evnafets

  • NEW LINE CHARACTER

    i am trying to load text into the BASIC TEXT of the material. The input file has matnr and the text. The file we loaded is fine. But in the text editor the # for new line character appears and this is causing problem while writing the text in a sapscript.
    so i am trying to remove the # for the new line character while we load the file. i am using
    data: c_tab like CL_ABAP_CHAR_UTILITIES=>CR_LF. to split the file and it is not being recognized. The input file is a tab delimited text file from excel. and it has " at the begining and ending.
    thanks in advance

    that is problem with Xls , If u have text with any Delimitors then u will get this kind of Stuff.
    prabhu,peram then i will get in text file as "prabhu,peram".
    Regards
    Prabhu

  • New line character in cipher text?

    Friends,
    I am encrypting a text in Triple DES/CBC mode/Nopadding mode. the length of text is 6500 bytes. in the cipher text that i get, it has new-line character(\n) & carriage return characters. As a result of this i m unable to read the cipher text from a C program(as it is not fully reading the cipher text). is there any methodology to overcome this problem. is there any way to avoid the new-line & carriage return characters in cipher text.
    Also is there any criteria like, the plaintext can be only max of this much bytes?
    Thanks in Advance

    The result of your encryption is bytes and not characters so your C program should process it as bytes and not as characters then bytes '\r' and '\n' will not be interpretted.
    It would be interresting to see your C code.

  • Force Windows New Line Character

    Hi,
    I've a problem with new line character. I am in Windows platform but
    when I write a file with a BufferedWitter with println I obtain the
    character "\n" x0D like separator (Unix Separator). My System property
    line.separator is "\r\n".
    Can someone tell me how can I obtain files with the correct \r\n
    Windows new line character?.
    Thanks in advance.

    Resolved
    The problem was another process that automatically was replacing "\r\n" form "\n" and I don�t know it.
    All works fine.
    Thanks a lot.

  • New line character in File adapter

    I am having a receiver file adapter which generates files with multiple lines.
    My problem is when the target file is opened in notepad there is no line break and the lines comes as continous string with small rectangle as separator.This fails the target upload program.
    When I remove those small squares in notepad and hit enter and then upload it gets uploaded successfully.
    Is there any way to have line break so that new line will be generated each time (the documenation says the by-default it adds new line character then why in notepad it opens like a continous string?)
    Thanks in advance.
    Regards
    Rajeev

    Hello
    I know by default File Adapter value is line break. But if I open that generated file in notepad, the record does'nt appear on the new line. Instead at the end of each line there is special character added at the end of each record. When I hit enter and deletes that special character and then try to load that file it gets loaded successfully.
    So my problem is how to generate the file will give record on the new line. I tried to give 'nl' as endSeparator.
    How to give hexadecimal values? I tried giving '0xHH' but that gives error in File Adapter
    "Error: Conversion initialization failed: Exception: java.lang.NumberFormatException: For input string: "HH"
    Thanks in advance.
    Regards
    Rajeev

  • Removing New Line Character in Input file

    Hi Experts,
    I Have a question about "New Line Character". I searched in SDN before posting this thread, But I didn't get answer.
    Question:
    Let me say my Client requirement first. After loading the data(Millions of Records) into SAP through LSMW, they asked write a program for validation of those loaded records based on I/P file. I wrote a program and It is success full.
    But, the problem is when file is in Application server in 'BIN' format, a new line character(#) is created. While comparing the last record of each line, it doesn't match. How to remove this new line character(#) in I/P file for each line of record? Please see the below records for example
    PROVINCIA DE BUENOS AIRE|   |1870|AR| #
    PROVINCIA DE BUENOS AIRE|   |1876|AR| #
    BOX 7407 PRINCETON|   |085437407|US|NJ#
    5756 2 A   CAPITAL FEDERAL|   |1431|AR|00#
    Note: This New line character is not matching the string "#".
    Please help me guys, so many objects are related with this concept. I appreciate quick response. Please.
    Thanks
    Sai

    Hi Arun, Ravi,
    I wrote the code like this, here 'fil_curre' is currency key.
    IF <l_wa_file_data>-fil_curre CS cl_abap_char_utilities=>newline.
              REPLACE ALL OCCURRENCES OF REGEX cl_abap_char_utilities=>newline
                                            IN <l_wa_file_data>-fil_curre WITH ''.
            ENDIF.
    While executing the code, the cursor here, simply jumps to next step.
    Any enhancements to this code or any new ideas?
    Thanks
    Sai

  • FileUtilsService Write String New Line Character

    Hi All,
    SITUATION:
    Writing a custom log file using the Write String service operation.
    Everytime an event occurs, i want to insert a new line, with date time stamp, details etc.
    PROBLEM:
    In the "value" property of the "write string" service operation... im inputting my relevant data but dont know how to indicate a new line
    WHAT I TRIED:
    I've tried every form of new line character i know: \n, \r, <BR>, \u0000a, \u0000d, ACSII, CRLF, etc, etc... none of them works.
    WHAT I FEAR:
    the exact same situation as http://forums.adobe.com/message/2780658#2780658 ... with a fairly definite answer
    I'm hoping i dont have to go this LONG ugly scary route.
    WAY FORWARD:
    Your thoughts, answers, suggestions....
    Thanking you all in advance.

    if going the "executeScript" way....
    this code worked for me:
    ===========================
    import java.lang.String;
    String vLogEntry = patExecContext.getProcessDataStringValue("/process_data/@logEntry");
    String vLogEntry = vLogEntry + " \r\n";
    patExecContext.setProcessDataStringValue("/process_data/@logEntry", vLogEntry);
    =================

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • New-line character in stacked message pop-up

    I have run into a brick wall with this situation--
    Our clients are running Client/Server Forms 6i, and Web Forms 6i using Patch 10. They are about to upgrade web forms to the latest version 9.0.4.1.0 (10g).
    We have a few PLL routines that use the stacked message method:    Message('text here'); Message('  ',no_acknowledge);to display important error messages to the user. It is especially useful to display the multiple ORA- errors when an unexpected server error occurs.
    Throughout all versions of Client/Server forms, and even in our old version of Web forms, I can use chr(10) or another character to start each error message on a new line.
    Somewhere after Patch 10, Oracle has removed that capability. Instead, pop-up stacked messages word-wrap into a multi-line message, and display the new-line character as a box indicating an unprintable character. Our nicely formatted messages are a mess!
    I have been told I should use an alert, which supports chr(10) as the new line. However, this is a PLL routine, and I would have to create an alert in hundreds of forms just to accommodate this short-sightedness. The changes and subsequent testing and release issues make this an unworkable solution.
    I am clueless as to why this feature would be removed. Oracle support is treating it as an enhancement request. Any ideas?

    Steve,
    If you really have hundreeds of forms ... create one more - to display your messages. Make it modal and nice looking. Call it through the library. Design it to work both as [OK] message and as an users responce [Yes]/[No]/[Cancel].
    And honestly - I don't think message(); message() is the best way to display messages. Whoever designed the application should've think about alerts with standartized naming convention, so they can be handled easily through the PLL.
    Venko

Maybe you are looking for

  • Value help for select-option not filling selection field

    I'm having some problems with a value help on a select-option. I've managed to get the value help displaying the correct values but for some reason can't get it to populate the selection field after I've selected a record. I have the following call:

  • Dedicated coding mask for standard template.

    Hi Experts I wish to maintain coding mask for: various varities of projects like: 1) PP/00000-00-00-00 2) PS/00000-00-00-00 3) PA/00000-00-00-00 To have the template functionality also in place, please suggest which of the following is best? 1) The a

  • URGENT:  Incomplete classpath settings

    hi all,        When we create the project for the development component in NWDS 2004. The Development component is having lot of errors. There is no default jarfiles available for the project in java build path --> libraries. When we add the jar ifle

  • Updates after Combo update reinstall

    I had some problems with alerts and notifications. I tried to reinstall the Combo update for 10.5.5 to fix those problems. Unfortunately I found the fix right after I started the update. Not wanting to break my system I just let the update finish. No

  • Round tripping probs

    With the Master Collection CS5 installed and Captivate 5 also installed, I assumed I would be able to edit audio with Soundbooth and edit images with Photoshop with the featured roundtrip editing function.  However, the EDIT IN SOUNDBOOTH is greyed o