DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2472
Version: 1.3-current


I've seen weird effects when dragging text between different apps and
between different windows of FLTK applications on Windows and Linux. I
don't know whether MacOS works better. The effect seems to be that the
character encoding on input may be interpreted wrong (or *assumed*
ISO-8859-1), and the inserted text is encoded again, so that we insert
weird character sequences.

My test: open 3 FLTK windows (2 test/input and one test/editor window).
Depending on the OS, open an editor of your choice (e.g. gedit on Ubuntu
Linux). Enter some non-ASCII text (e.g. "äöü߀ÄÖÜ" = German
Umlauts, sharp s, Euro) in one of the input fields, mark the text, and
drag it to another app's window). You can also edit misc/iso-8859-1.txt
and/or misc/iso-8859-1_utf-8.txt

Note that DND within the same window (e.g. from "Normal" input to
"Multiline" in test/input) works well, but the same fails if I drop the
text in another window, even if this is also the same FLTK app.
test/input).

If the drag source is gedit, then the text seems almost okay (I used both
misc/iso-8859-1.txt and misc/iso-8859-1_utf-8.txt in this case). gedit
seems to miss-interpret the former as iso-8859-15, but taking this into
account, the result looks almost okay, but seems to contain CR's at the
line endings). If I drag from test/editor to gedit, the result is also
encoded wrong.

On Windows, the results are okay from FLTK to FLTK, but not from FLTK to
an editor (notepad++). Note that notepad++ can set up its encoding ("ANSI"
or "UTF-8") and does a good job on converting the input to the right
encoding, at least when using the clipboard). DND between firefox and
notepad++ works flawlessly, hence I assume that they do it well.

I don't think that this description is complete, but there should at least
be enough test cases to find the bug(s). I'm sorry, but I can't help with
this.

One last test case: when editing this text in firefox (on Windows), I
selected the full text, copied it to the clipboard (^C), and pasted it in
test/editor: result is okay. However, dragging the same text appends <CR>
at each forced line end (after pressing enter). The encoding looks okay,
though. Looks like we must also take care of line endings in DND
operations.


Link: http://www.fltk.org/str.php?L2472
Version: 1.3-current

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to