lkml.org 
[lkml]   [2004]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: stty utf8
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.261 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site