- Subject: Re: [slang-users] keystring conversion to non UTF-8 string?
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- Date: Fri, 18 Aug 2006 11:55:53 +0000 (UTC)
Hello John,
"John E. Davis" <davis@xxxxxxxxxxxxx> wrote:
> Jörg Sommer <joerg@xxxxxxxxxxxx> wrote:
>>int main(void)
>>{
>> const unsigned char *raw_seq = SLang_process_keystring("^/");
> [...]
>>Is this expected? Jed does not handle this case, e.g. it prints <EF> if
>>it runs in an UTF-8 termnial.
>
> What should it print?
It should print ï.
> Strictly, speaking "^/" is not a real control character.
Ahh.
> The SLang_process_keystring converts ^X to an unsigned byte value using
> the algorithm
>
> (unsigned char) (X - 'A' + 1)
>
> This mechanism works for valid control characters ^A-^Z as well as ^@,
> ^[, ^\, ^], ^^, and ^_.
Can you check for this range, e.g. >= '@' and <= '_'? And outside of this
range do nothing or throw an error. How else can I give the key sequence
"^X ^ /"?
> That is, it does not produce the two byte sequence <C3><AF>. Is that
> what you were expecting?
Yes.
Bye, Jörg.
--
Dadurch, daß man einen anderen ins Irrenhaus sperrt,
beweist man noch nicht seinen eigenen Verstand.
_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]