• 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 16:40:06 +0100

> Uh? getchar() reads a _single_ character from stdin. It simply _can't_
> return a whole string: it returns an int.

True. ;-) But the characters of a complete line aren't received by getchar()
until the user hits return in the Terminal. The characters are buffered
somewhere.

But now I am not sure if the Terminal buffers these characters or if this is
done by the C library.

> the "buffer handling" is done by the C library.

OK, that would explain my UTF-8 pain. ;-)
I have not known that the buffering is done by the C library.

But I am not completely sure about that. Doesn't that mean that backspace
characters are "interpreted" by the (buffering) C library, if the user
connects the stdin in the Terminal to a file??

Ciao,
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.

  • Follow-Ups:
    • Re: Terminal and UTF-8
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: regarding cocoa frameworks
  • Next by Date: Re: cocoa-dev digest, Vol 2 #396 - 14 msgs
  • Previous by thread: Re: Terminal and UTF-8
  • Next by thread: Re: Terminal and UTF-8
  • Index(es):
    • Date
    • Thread