Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4313838

Win&Sol Japanese:DnD from native app doesn't work with selectBestTextFlavor

XMLWordPrintable

    • generic
    • generic


      On solaris & win32
      DnD from native application or TextArea(on Solaris only) does not work well
      with DataFlavor.selectBestTextFlavor.


      On Solaris:
      DnD of alphabetical and numeric characters can work.
      DnD of Japanese characters can not and Exception is thrown in getReaderForText;

       java.io.IOException: class java.io.IOException:no native data was transferred caught while getting Data
      at java.awt.dnd.DropTargetContext$TransferableProxy.getTransferData(DropTargetContext.java:344)
      at java.awt.datatransfer.DataFlavor.getReaderForText(DataFlavor.java:493)
      at DragDropTest$Target.drop(DragDropTest.java:89)

      DataFlavor returned by DataFlavor.selectBestTextFlavor is;
      MIMEType=text/plain; class=java.io.InputStream; charset=iso8859-1
      "iso8859-1" can not treat 2byte characters.

      DataFlavors returned by DropTargetDropEvent is;
      MIMEType[0]=text/plain; class=java.io.InputStream; charset=unknown
      MIMEType[1]=text/plain; class=java.io.InputStream; charset=X11-COMPOUND_TEXT
      MIMEType[2]=text/plain; class=java.io.InputStream; charset=iso8859-1


      On Win98:
      DnD of alphabetical and numeric characters can work.
      DnD of Japanese characters can not work;
      Characters can not be displayed correctly
      (Japanese character is displayed as "?")
      DataFlavor returned by DataFlavor.selectBestTextFlavor is;
      MIMEType=text/plain; class=java.io.InputStream; charset=ascii


      On Win95&NT:
      DnD of alphabetical and numeric characters CANNOT work.
      DnD of Japanese characters can not work;
      Characters can not be displayed correctly (displayed in
      rich text code).
      DataFlavor returned by DataFlavor.selectBestTextFlavor is;
      MIMEType=text/enriched; class=java.io.InputStream; charset=ascii

      On win98 MIMEType returned is text/plain.
      On win95/NT MIMEType returned is text/enriched.


      To reproduce,

      1. Compile and run an attached program "DragDropTest".
      2. On solaris: DnD from TextArea at the bottom of the window of test program, or
      from native application (ex. text editor)
         On Win32: DnD from native application (ex. WordPad).



      *********miki.tokunaga@japan*********

      I discussed with ###@###.### about this bug and
      David will treat the problem in 1.3.1 or later.

      miki.tokunaga@japan 2000-03-28







            dassunw Das Das (Inactive)
            mmtokunasunw Mtokunaga Mtokunaga (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: