9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@labs.coraid.com>
To: 9fans@9fans.net
Subject: Re: [9fans] hard-coded UTF-8 in wc.c
Date: Mon, 15 Mar 2010 17:13:40 -0400	[thread overview]
Message-ID: <f162c25ba3a2d4f206b1eccf52df8742@coraid.com> (raw)
In-Reply-To: <20100315210251.GA26934@machine>

On Mon Mar 15 17:12:06 EDT 2010, aim0shei@lavabit.com wrote:
> Just looked at source of wc
> (http://plan9.bell-labs.com/sources/plan9/sys/src/cmd/wc.c). UTF-8
> is hard-coded here. What is the reason? Nobody wants to rewrite it,
> it is optimization or it is impossible to rewrite it using runes for
> some reason?
>
> http://plan9.bell-labs.com/sys/doc/utf.html says all you need to do to
> change encoding is:
> 1. Rewrite UTF encoding/decoding code.
> 2. Convert all text files.
> 3. Recompile all software.
>
> Looks like it is impossible with current code. It is not fixed just
> because there is more important work or there is some serious problem
> in design?

perhaps you have misunderstood.

inside programs, sometimes unicode text is represented as
runes.  runes are not sent over pipes nor stored in files.

therefore, there is no need to wc runes.

- erik



  reply	other threads:[~2010-03-15 21:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 21:02 anonymous
2010-03-15 21:13 ` erik quanstrom [this message]
2010-03-15 21:35   ` anonymous
2010-03-15 22:44     ` erik quanstrom
2010-12-29  4:40 erik quanstrom

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=f162c25ba3a2d4f206b1eccf52df8742@coraid.com \
    --to=quanstro@labs.coraid.com \
    --cc=9fans@9fans.net \
    /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).