General discussion

Locked

A UNIX TEXT FILE IN WINDOS HAS SOME GARB

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?

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

A UNIX TEXT FILE IN WINDOS HAS SOME GARB

by McKayTech In reply to A UNIX TEXT FILE IN WINDO ...

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

Collapse -

A UNIX TEXT FILE IN WINDOS HAS SOME GARB

by haqr In reply to A UNIX TEXT FILE IN WINDO ...

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.

Collapse -

A UNIX TEXT FILE IN WINDOS HAS SOME GARB

by hugevlad In reply to A UNIX TEXT FILE IN WINDO ...

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.

Collapse -

A UNIX TEXT FILE IN WINDOS HAS SOME GARB

by haqr In reply to A UNIX TEXT FILE IN WINDO ...

Thanks Vlad.

Collapse -

A UNIX TEXT FILE IN WINDOS HAS SOME GARB

by basilisk In reply to A UNIX TEXT FILE IN WINDO ...

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 <filename>". 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.

Collapse -

A UNIX TEXT FILE IN WINDOS HAS SOME GARB

by haqr In reply to A UNIX TEXT FILE IN WINDO ...

Thanks very much.

Back to Linux Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums