9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Douglas A. Gwyn" <DAGwyn@null.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] ... in the Kingdom of Sources
Date: Tue,  9 Sep 2003 08:34:03 +0000	[thread overview]
Message-ID: <JOCdnUa8OfYQlsCiXTWJhA@comcast.com> (raw)
In-Reply-To: <16d2f27efa70d6b1ca98ab72d6c91245@mightycheese.com>

rob pike, esq. wrote:
> there are two important differences.  first is that (old) ANSI C
> did not provide any formatted i/o for wchar_t, rendering them
> essentially useless.

The target clientele at the time insisted that they did not want
us to specify more than the minimum necessary support, and that
they would happily invoke the multibyte<->wide conversions when
necessary.  I remember Plauger relaying that promise.  Not
surprisingly, as soon as they got the capability they started
pushing for the missing functions, which became part of a
normative amendment to the C standard by 1995 (along with mode
on the stream to control whether automatic conversion is or is
not applied).

> the way plan 9 handles encoding errors with runetochar
> and chartorune, by introducing the 'error rune' 0x80, is vastly
> more convenient and effective than the error return values set
> by mbtowchar stuff.

Since an encoding error should "never" occur, we thought it
better to stop scanning rather that plow ahead and convert some
unknown amount of garbage once synchronization has been lost.
It was also not evident that there would always be a "spare"
wide-character code available for in-band signaling.

I think the main difference driving the designs is that the
Standard C version has to accommodate a huge variety of
multibyte and internal encoding systems, whereas Plan 9 could
just pick one.

Anyway, the C wide-character facilities are quite similar to
the legacy char-based ones, so Boyd shouldn't be finding them
"confusing".


  reply	other threads:[~2003-09-09  8:34 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-05 11:54 David Presotto
2003-09-05 12:14 ` Lucio De Re
2003-09-05 12:33   ` boyd, rounin
2003-09-07  9:00     ` Aharon Robbins
2003-09-07  9:05       ` boyd, rounin
2003-09-08  9:10         ` Douglas A. Gwyn
2003-09-08  9:52           ` boyd, rounin
2003-09-08 17:33           ` rob pike, esq.
2003-09-09  8:34             ` Douglas A. Gwyn [this message]
2003-09-09 15:50               ` rob pike, esq.
2003-09-09 15:50               ` rob pike, esq.
2003-09-10 10:17               ` Bruce Ellis
2003-09-11  9:07                 ` Douglas A. Gwyn
2003-09-11 13:06                   ` rog
2003-09-11 14:01                     ` Lucio De Re
2003-09-11 14:25                       ` rog
2003-09-11 15:17                         ` Lucio De Re
2003-09-12  9:18                         ` Douglas A. Gwyn
2003-09-11 15:48                     ` rob pike, esq.
2003-09-11 17:04                       ` Lucio De Re
2003-09-11 17:40                         ` chris
2003-09-12  4:13                           ` boyd, rounin
2003-09-12  9:18                           ` Douglas A. Gwyn
2003-09-12 15:18                             ` rob pike, esq.
2003-09-12 16:39                               ` rog
2003-09-12  9:18                         ` Douglas A. Gwyn
2003-09-12  0:56                     ` Bruce Ellis
2003-09-11 15:42                   ` rob pike, esq.
2003-09-12  1:18                     ` okamoto
2003-09-12  9:18                     ` Ralph Corderoy
2003-09-12  9:57                       ` Bruce Ellis
2003-09-15  8:27                         ` Douglas A. Gwyn
2003-09-12  3:53                   ` boyd, rounin
2003-09-12  3:01               ` Dan Cross
2003-09-07 13:48       ` Russ Cox
2003-09-07 15:45         ` David Presotto
2003-09-06 11:13   ` boyd, rounin
  -- strict thread matches above, loose matches on Subject: below --
2003-09-05 12:04 David Presotto
2003-09-05  6:39 lucio
2003-09-05  6:31 ` Lucio De Re
2003-09-05 11:30 ` David Presotto
2003-09-05 11:42 ` David Presotto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=JOCdnUa8OfYQlsCiXTWJhA@comcast.com \
    --to=dagwyn@null.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).