You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Leopard Terminal.app no longer supports ANSI print escape sequences?!!

I print my email using pine's "attached-to-ansi" option, which used to work great in Tiger with Terminal.app. It no longer works in Leopard. It also breaks things like the "ansiprt" Unix command.

This is a start/stop escape sequence that diverts text between the start/stop sequences to the printer. See http://www.termsys.demon.co.uk/vtansi.htm as a reference.

Is there some Terminal.app setting I need to use to enable this? Some specific terminal type perhaps?

Suggesting that I use enscript or other techniques don't work, as I use the Terminal to ssh into my mail server, then run pine on the mail server.

Anyway, any idea how to get this very desirable feature back?

Thanks,

-John

PowerBook G4

Posted on Feb 2, 2008 11:05 AM

Reply
11 replies

Feb 2, 2008 11:10 AM in response to John Kelso

There were some subtle changes to the unix underpinnings in 10.5. I don't really follow what you are asking about. I do read email with pine, and maybe could try to reproduce the problem. Could you give explicit directions?

Does it work with xterm, iterm, or other terminal.app alternatives? I suspect it might be a bash shell level problem. Can you use zsh?

Feb 2, 2008 12:18 PM in response to John Kelso

John Kelso wrote:
Is there some Terminal.app setting I need to use to enable this? Some specific terminal type perhaps?


Terminal >Preferences > Settings > Advanced > Escape non-ASCII output

There are several other Terminal settings that could affect this behavior as well.

Suggesting that I use enscript or other techniques don't work, as I use the Terminal to ssh into my mail server, then run pine on the mail server.


Actually enscript seems like a clever solution. Could you explain more about that and how it doesn't work?

Feb 2, 2008 4:32 PM in response to etresoft

HI,

I tried to set "Escape non-ASCII input" without any change. I didn't see an option to change "Escape non-ASCII output". I tried a few other things without success either using a different terminal type and so forth. I looked in the .term file and didn't see anything text related to ANSI or ASCII or escape.

If I change a Terminal preference do I need to quit and restart Terminal to test the change, or does the change take place as soon as I change it in the menu? I tried quitting and restarting after checking "Escape non-ASCII input" and when I restart the box was unchecked. I couldn't find a "save preferences option either.

In Tiger, my terminal type was xterm-color- same in Leopard. I had checked off "Escape non-ASCII characters" under Tiger.

Here's exactly what I do, *which used to work in Leopard*.

I run Terminal.app on my MacBook, and ssh to a mail server. On the mail server, I run the pine command to read my mail. Pine has an option to print email using ASCII escape sequences. Terminal.app sees these escape sequences and diverts the text to the default printer on my MacBook.

Under Leopard, the Terminal doesn't catch the ANSI escape code, and just spews the text to the terminal window. Nothing has changed on the mail server side. I;m using the sane ssh command.

Enscript won't work, as the printer connected to the mail server is often as not in a different state than my MacBook.

Not all terminal emulators support the ANSI print escape sequences. Terminal didn't before Tiger, if I remember correctly. I used to use a very nice terminal emulator called Data Comet which did it.

ANSI printing used to be a fairly common way to print to a local printer connected to via a parallel cable. Besides pine, the Unix command ansiprt http://kb.iu.edu/data/abye.html could be used to print remote files on the local printer. Some terminal emulator programs used the idea to hook the ANSI escape sequence to the printing system, extending the functionality to use any printer accessible by the local system.

Thanks again for all your help. I hope I've clarified what I'm trying to do.

-John

Feb 3, 2008 11:10 AM in response to Bill Scott

Hi,

I did try iTerm, and had to let it go, in spite of liking some of its features.

The two problems I had were:

1) When using emacs, the screen kept getting badly trashed. It was basically unusable.

2) I couldn't figure out how to use the mouse to send cursor positioning commands. The iTerm list suggested there was a way to do it, but I never got specific directions on how to do it. As item 1 was a deal-breaker, this wasn't all that important.

That said, maybe they've fixed some of these issues, so I'll try it again.

Thanks,

-John

Feb 3, 2008 6:36 PM in response to John Kelso

Actually, the bug is under my account and they would contact me if they needed further information. I did include a link to this thread in my bug report, so they could track you down if there were so inclined, but they probably won't.

I thought about this before I filed the bug. Should I just file the bug since I looked at it and was able to isolate ssh out of the issue? Or should I just post a link to the Apple Bug Reporter? Usually in these cases I just file the bug myself. I'm a software developer myself so I'm used to doing that. You need a developer account in order to access the bug reporter system. An account is free, but might be considered a hassle to create. So I apologize if you would have rather filed the bug yourself. I took a guess that you wouldn't want the hassle.

Most of the bugs I have filed have been duplicates. I usually never hear anything back other than a note that says someone else found the bug first. A few days after 10.5 came out, I got an e-mail saying several of my bugs were considered fixed and asking me to verify that - which I did. I have gotten a couple of personal responses back asking for more information, so someone at Apple really does read bug reports.

Leopard Terminal.app no longer supports ANSI print escape sequences?!!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.