Re: Terminal and UTF-8
Re: Terminal and UTF-8
- Subject: Re: Terminal and UTF-8
- From: Ondra Cada <email@hidden>
- Date: Tue, 26 Mar 2002 16:48:31 +0100
On Tuesday, March 26, 2002, at 04:40 , Manfred Lippert wrote:
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.
they are. So what?
But now I am not sure if the Terminal buffers these characters or if this
is
done by the C library.
Actually both, at least so far as you use stdio. But again, so what? If
the tool is not UTF-8-aware (and there is hardly any such), it is utterly
unimportant how and where the data are buffered: eventually, they come to
the tool anyway as some six-byte sequence instead of one Chinese character,
and the tool goes wild. There is *NO* way to dodge that but to re-program
the tool using NSStrings (or another API of the same strength).
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.