• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Terminal and UTF-8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Terminal and UTF-8


  • Subject: Re: Terminal and UTF-8
  • From: Manfred Lippert <email@hidden>
  • Date: Tue, 26 Mar 2002 15:29:44 +0100

>> An entered line is completely buffered by the terminal, so
>> the program hasn't to deal e.g. with Backspace if the user corrects
>> characters and so on. The characters are send not till the user completes
>> the line with the return key.
>
> Hu? Who told you that nonsense? It's not true at all :-)

For sure this is true. You can try it your own: Write a little program that
reads characters from stdin via getchar. You never will get any backspace
characters and such things, and the characters of a line will not be sent
until you hit the return key.
Note: This is only true if stdin is connected to the "keyboard" (so the
Terminal handles the input). If you use pipes to link stdin to a file or
other streams, there is no line buffering for sure.

> In which programs does it work, then?

In all my programs that get characters from stdin via getchar or scanf etc.
;-)

But perhaps there is some way for programs to prevent the line buffering of
the terminal. Hmmm, I think tcsh needs to do that to enable the "history"
(Cursor up/down).

Regards,
Mani
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Terminal and UTF-8 (From: Max Horn <email@hidden>)

  • Prev by Date: regarding cocoa frameworks
  • Next by Date: Re: regarding cocoa frameworks
  • Previous by thread: Re: Terminal and UTF-8
  • Next by thread: Re: Terminal and UTF-8
  • Index(es):
    • Date
    • Thread