jed-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Non-ascii chars in UTF-8 mode not bindable


Hallo John,

"John E. Davis" <davis@xxxxxxxxxxxxx> wrote:
> I wrote:
>>And here is the implementation of the utf8_local_setkey,
>>utf8_definekey, and utf8_setkey functions.  It's a bit ugly but I
>>think it works. --John
>
> I was wrong.  Let me try again.  --John
>
> private variable UTF8_Keymaps = Assoc_Type[];
> private variable Key_Sequence = NULL;
> define utf8_handler ()
> {
>    variable byte = LAST_CHAR;
>    variable byte_str = eval(sprintf("\"\\x%02X\"", byte));
>
>    if (Key_Sequence == NULL)
>      {
> 	if (0 == (byte & 0x80))
> 	  throw InvalidParmError, "Unexpected byte passed to utf8_handler";
>
> 	Key_Sequence = byte_str;
> 	return;
>      }

Isn't it possible to read the rest with _getkey()?

Bye, Jörg.
-- 
“Computer games don't affect kids. If Pacman would have affected us as
children, we would now run around in darkened rooms, munching pills and
listening to repetetive music.”

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2007 date index] [2007 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]