General discussion

  • Creator
    Topic
  • #2073624

    A UNIX TEXT FILE IN WINDOS HAS SOME GARB

    Locked

    by haqr ·

    I have a job that uses sendmail to mail a file into LOTUS NOTES and along with the mail is a UNIX TEXT FILE as an attachment.
    When I use WordPad to view the attachment, I get some garbage characters in the file.
    however, when I ftp the file over the file is just fine.
    Do I need to use some sore of decoding or is there anythin else I should do to the file prior to sending it as an attachment?

All Comments

  • Author
    Replies
    • #3893416

      A UNIX TEXT FILE IN WINDOS HAS SOME GARB

      by mckaytech ·

      In reply to A UNIX TEXT FILE IN WINDOS HAS SOME GARB

      If I understand the problem correctly, there are a couple of possibilities. One is that sendmail is using either a non-standard default character set or not using pure text MIME encoding. That would, of course, be fixed on the sendmail end in theconfiguration file.

      I’d also look at the Notes end and make sure it is set to handle pure text. I’m pretty ignorant of Notes, but I know Exchange has a couple of options for how MIME attachments are handled.

      paul

      • #3776338

        A UNIX TEXT FILE IN WINDOS HAS SOME GARB

        by haqr ·

        In reply to A UNIX TEXT FILE IN WINDOS HAS SOME GARB

        Thanks very much Paul.
        I will take a look at the snedmail configuration file and if I run into more issues, then will let you know.
        Thanks again.
        -Reza.

    • #3893412

      A UNIX TEXT FILE IN WINDOS HAS SOME GARB

      by hugevlad ·

      In reply to A UNIX TEXT FILE IN WINDOS HAS SOME GARB

      The main difference between UNIX and DOS(Windows) text files is string termination. In “UNIX-World” each string terminates by LF-character (ASCII code 10), and DOS-way is terminating strings bye CR-LF pair (ASCII 13 and 10). When you get text file using ftp (as ASCII, not binary) it make this convertion. When you receive “pure” file by e-mail and open it “as is”, WordPad can`t recognize strings terminations. Try adjust your mail client to LF to CR-LF convertion.

      With best regards,
      Vlad.

    • #3894488

      A UNIX TEXT FILE IN WINDOS HAS SOME GARB

      by basilisk ·

      In reply to A UNIX TEXT FILE IN WINDOS HAS SOME GARB

      As the previous answer mentioned, Win/DOS expects the lines to end with LF-CR, while Unix just uses LF. If you can’t get your app to view the lines correctly from the Windows side, you can try fixing them while still in Unix, using vim, a standard text editor available in many Unix installations.
      Open the file by issuing the command “vim “. Then, change the format vim saves in by typing “:set ff=dos” in the vim window (the colon is important). Then resave the file and exit vim by typing “:wq” in the vim window. Vim can also be used to get rid of the annoying ^M’s that show up when you send Win/DOS files to Unix, by using “:set ff=unix” instead.

Viewing 2 reply threads