Drag and drop to windows Editors
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   chunhe_dai
Posted On:   Tuesday, September 18, 2001 01:01 PM

Hi, I am trying to write a program that can drag strings from Java to windows Editors. When I do it, windows drop target asks Dataflavor.plainTextFlavor in Unicode. However, when I get the unicode out of the string and pass it back through ByteArrayInputStream, it shows 1 more character before the actually text in Editors other than word XP. Those 2 bytes are -2-1 in java. I suppose they are indications of Unicode. If I delete those 2 bytes manally, it works fine. However, sometimes, I get 2 or 3 more characters in the windows side at the end of the text and those characters are not in java side. Sometimes, I do get the right one, however. Does anyone know what might cause this problem?    More>>

Hi, I am trying to write a program that can drag strings from Java to windows
Editors. When I do it, windows drop target asks Dataflavor.plainTextFlavor
in Unicode. However, when I get the unicode out of the string and pass it
back through ByteArrayInputStream, it shows 1 more character before the
actually text in Editors other than word XP. Those 2 bytes are -2-1 in
java. I suppose they are indications of Unicode. If I delete those 2 bytes
manally, it works fine.




However, sometimes, I get 2 or 3 more characters in the windows side at the end of the text and those characters are not in java side. Sometimes, I do get the right one, however. Does anyone know what might cause this problem?



Thanks,

Chunhe    <<Less
About | Sitemap | Contact