jed-users mailing list

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

jed: utf-8 question


Hi, John!

I have a problem with UTF-8 in fljed.

When I press a key that generates an UTF-8 sequence in FLTK,
I forward the sequence to JED using buffer_keystring.

The buffer is changed correctly, but the display is not.
I tried to use JX_write_smgchars, but it does not work:

  - each character from the UTF-8 sequence is stored in its own
    VTerm_Display cell - it is not converted to SLwchar_Type

  - FLTK displays the characters corectly (the right glyphs),
    but when I move over a character with the cursor,
    single bytes from UTF-8 sequence are displayed

  - cursor position is wrong in lines with UTF-8 chars.

When should the conversion form UTF-8 to WideChar happen?
Is there a flag to turn the conversion on?
I see an 'U' in the status line.

If the characters are stored in wide-char, but I want them
displayed in FLTK, I must convert them back to UTF-8.
Would it be better to write my own terminal that stores
single characters in UTF-8? Or should I treat FLTK as a
full UTF-8 terminal and completly forget about vterm.c?


A question about xterm:
When you call cover_exposed_area(), the characters are
read from VTerm_Display and then after many calls, stored
back into VTerm_Display - vterm_write_ncahrs. Should this
be fixed?

Aha! vterm_write_ncahrs should probably convert from
UTF-8 to wide-char. Correct?

Thank you, and a happy 2005
Marko


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


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