[slang-users] keystring conversion to non UTF-8 string?
Jörg Sommer
joerg at alea.gnuu.de
Thu Aug 17 19:11:35 EDT 2006
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
More information about the slang-users-l
mailing list