-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8u111
-
x86_64
-
linux
FULL PRODUCT VERSION :
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux wanobi 4.8.0-27-generic #29-Ubuntu SMP Thu Oct 20 21:03:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
When pasting content from Gtk clipboard, the code in the two C++ methods
- Java_com_sun_glass_ui_gtk_GtkSystemClipboard_popFromSystem
- get_data_raw(JNIEnv *env, const char* mime, gboolean string_data)
make the assumption that 'text/???', and specially 'text/html' are UTF-8.
When Firefox pastes content, it is encoded in UTF-16. This fact can be easily detected with the leading BOM sequence (FE FF).
A workaround is to use the AWT Toolkit Clipboard manager. It lets the user decide how to decode the clipboard contents.
This is the probable cause of bug 8133337
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8133337
Sorry, I could not find how to add comment on a bug.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See steps of http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8133337
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
A workaround to this bug is to use the AWT Toolkit Clipboard manager. It lets the user decide how to decode the clipboard contents.
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux wanobi 4.8.0-27-generic #29-Ubuntu SMP Thu Oct 20 21:03:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
When pasting content from Gtk clipboard, the code in the two C++ methods
- Java_com_sun_glass_ui_gtk_GtkSystemClipboard_popFromSystem
- get_data_raw(JNIEnv *env, const char* mime, gboolean string_data)
make the assumption that 'text/???', and specially 'text/html' are UTF-8.
When Firefox pastes content, it is encoded in UTF-16. This fact can be easily detected with the leading BOM sequence (FE FF).
A workaround is to use the AWT Toolkit Clipboard manager. It lets the user decide how to decode the clipboard contents.
This is the probable cause of bug 8133337
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8133337
Sorry, I could not find how to add comment on a bug.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See steps of http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8133337
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
A workaround to this bug is to use the AWT Toolkit Clipboard manager. It lets the user decide how to decode the clipboard contents.
- duplicates
-
JDK-8133337 [Linux] Pasting HTML from Firefox does not work
-
- Open
-