slang-users mailing list

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

[slang-users] keystring conversion to non UTF-8 string?


Hi,

#v+
% cat test.c
#include <slang.h>
#include <stdio.h>

int main(void)
{
    const unsigned char *raw_seq = SLang_process_keystring("^/");

    for (int i=1; i < *raw_seq; ++i)
      printf("0x%02x ", raw_seq[i]);
    printf("\n");

    const char *key_str = SLang_make_keystring(raw_seq);
    do
      printf("0x%02x ", *key_str++);
    while (*key_str != '\0');
    printf("\n");

    return 0;
}

% ./test
0xef 
0xef 
#v-

Is this expected? Jed does not handle this case, e.g. it prints <EF> if
it runs in an UTF-8 termnial.

Bye, Jörg.
-- 
"...anytime you install something new on the Windows platform, you risk
spending the next five or six hours trying to figure out what happened"
         -- Robert Roblin, Adobe

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


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