From: Jamie Lokier <jamie@shareable.org>
To: Clayton Weaver <cgweav@email.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: stty utf8
Date: Fri, 20 Feb 2004 00:13:47 +0000 [thread overview]
Message-ID: <20040220001347.GB5590@mail.shareable.org> (raw)
In-Reply-To: <20040219185347.A94A23CE24D@ws3-4.us4.outblaze.com>
Clayton Weaver wrote:
> In an application that is taking input in utf-8,
> if I want to search, compare, yada yada, I need
> to convert to wchar_t first (for iswspace() et al),
No, most search and compare operations are done directly on UTF-8,
and it's much more efficient to do that than convert to wchar_t.
> Why would not terminals do the same thing?
Because they're made of logic chips which you can't change now, have
ROMs, must be compatible with the VT100 and ANSI escape sequences,
must run over an 8-bit channel...
Mostly because that's the way terminals are. You could design a _new_
terminal protocol but it's not going to be useful because you want to
talk with the existing terminals.
> Done that way, Jamie's delete example is
> backspace-space-backspace and remove sizeof(wchar_t)
> from the input.
You could store wchar_t in the terminal queue, but what would be the
point? Removing a UTF-8 character from the input is _trivial_.
> Ok, it takes more space than operating on the utf-8
> encoding directly, but otherwise why not?
Because there's no point.
-- Jamie
next prev parent reply other threads:[~2004-02-20 0:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-19 18:53 stty utf8 Clayton Weaver
2004-02-20 0:13 ` Jamie Lokier [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-20 20:57 Clayton Weaver
2004-02-20 20:19 Markus Kuhn
2004-02-17 22:59 Andries.Brouwer
2004-02-17 23:15 ` Linus Torvalds
[not found] <04Feb13.163954est.41760@gpu.utcc.utoronto.ca>
2004-02-14 23:06 ` JFS default behavior Robin Rosenberg
2004-02-14 23:29 ` viro
2004-02-15 0:07 ` Robin Rosenberg
2004-02-15 2:41 ` Linus Torvalds
2004-02-16 15:05 ` stty utf8 Jamie Lokier
2004-02-16 16:10 ` Gerd Knorr
2004-02-16 22:03 ` Jamie Lokier
2004-02-16 22:17 ` Linus Torvalds
2004-02-16 22:04 ` Jamie Lokier
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=20040220001347.GB5590@mail.shareable.org \
--to=jamie@shareable.org \
--cc=cgweav@email.com \
--cc=linux-kernel@vger.kernel.org \
/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