On Thu, Oct 23, 2008 at 03:41:40PM +0000, corvid wrote:
Tomas wrote:
"corvid" <corvid@lavabit.com> wrote:
Tomas wrote:
What's causing the addition of garbage symbols, like here (comments by tr (6th & 8th comment(most visible in 8th))): http://www.nezinau.lt/microsoft-lazerines-peles-sugeba-nustebinti#comments Backspace?
Looks like it.
I pasted a random chunk of text ending in a non-ASCII character into a textarea with a form submitting as UTF-8. "mink??" became "mink%C5%A1" in the submitted data, which I believe is right. Then I pressed backspace in the textarea, leaving "mink", and submitted again. Now it submits "mink%A1", which is wrong. Input type=text doesn't seem to have the problem. Probably something wrong in fltk's TextEditor, then. I'll see if I can find where it's missing some utf8-awareness.
Hey you were quick to figure that out :)
In fltk/src/TextEditor.cxx, you could try replacing the kf_backspace with:
int TextEditor::kf_backspace(int, TextEditor* e) { int oldpos = e->insert_position(); if (!e->buffer()->selected() && e->move_left()) e->buffer()->select(e->insert_position(), oldpos); kill_selection(e); e->show_insert_position(); e->maybe_do_callback(); return 1; }
Looks like their kf_delete is broken as well...
It'd be great if an FLTK2 STR with patch is made out of this. (Johannes knows what's required. Just user/passwd?) -- Cheers Jorge.-