Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problem inputting Japanese using XIM



>>>>> In <020121152432.ZM27716@xxxxxxxxxxxxxxxxxxxxxxx> 
>>>>>	"Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx> wrote:

> > I'm wondering why zsh considers characters in the [0x80, 0xa0] range
> > as control characters?

> Zsh does not handle multibyte character sets, in general.  Internally it
> always treats a single byte as a single character.  The characters with
> ASCII values above 128 are meta-characters, and those in the range 128-
> 159 are control-meta-characters (just as 0-31 are control without meta).

Thank you for the response, I understood that.

By the way, the control-character formatting routines can be found here
and there in Src/Zle/*.c.  While they convert 0x0a into the form of "^J"
and so on, it seems that which is only helpful in displaying C0
characters, not C1 characters.  Is this expected?

The actual code is as follows:

(snipped off Src/Zle/zle_refresh.c:1122 ...)
	} else if (line[t0] == 0x7f) {
	    *vp++ = '^';
	    *vp++ = '?';
	} else if (icntrl(line[t0])) {
	    *vp++ = '^';
	    *vp++ = line[t0] | '@';
	} else
	    *vp++ = line[t0];

Regards,
-- 
Daiki Ueno



Messages sorted by: Reverse Date, Date, Thread, Author