mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Clayton Weaver" <cgweav@email.com>
To: linux-kernel@vger.kernel.org
Subject: Re: stty utf8
Date: Thu, 19 Feb 2004 13:53:47 -0500	[thread overview]
Message-ID: <20040219185347.A94A23CE24D@ws3-4.us4.outblaze.com> (raw)

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),
then convert back to utf-8 for output (so grep et al
and operations on pathnames are not hosed by embedded
nul bytes in the output).

Why would not terminals do the same thing?

Done that way, Jamie's delete example is
backspace-space-backspace and remove sizeof(wchar_t)
from the input.

Ok, it takes more space than operating on the utf-8
encoding directly, but otherwise why not? All display
characters begin at the same offset from the
character before or after. It's up to the terminal
code to convert to/from utf-8 when talking to the rest
of the kernel.

Regards,

Clayton Weaver
<mailto: cgweav@email.com>

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


             reply	other threads:[~2004-02-19 18:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-19 18:53 Clayton Weaver [this message]
2004-02-20  0:13 ` Jamie Lokier
  -- 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=20040219185347.A94A23CE24D@ws3-4.us4.outblaze.com \
    --to=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

all inboxes | Powered by JetHome®