This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 32670 - I18N - "Copy / Paste" doesn't work correctly with Japanese characters.
Summary: I18N - "Copy / Paste" doesn't work correctly with Japanese characters.
Status: VERIFIED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: -S1S-
Hardware: Sun All
: P2 blocker (vote)
Assignee: issues@editor
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2003-04-07 10:28 UTC by hiroshiy
Modified: 2007-11-05 13:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hiroshiy 2003-04-07 10:28:08 UTC
Issue:
   When I Copy / Paste Japanese characters from
IDE's texteditor
     to non-IDE's texteditor,
     Japanese characters are appeared incorrectly
in non-IDE's editor.

Environment:
  - Solaris 8 / 9
      This issue is not re-appeared in Windows or
Linux.
  - S1S nevada Build (e.g 030403), NetBeans Dev
Build (e.g. 2003 0328 0100)
  - JDK1.4.0, JDK1.4.1

To Reproduce 1:
  1. Create or Open any file in IDE's texteditor.
  2. Input any Japanese characters, and Copy them.
  3. Paste to any texteditor which is in outside
of IDE.
       Japanese characters are appeared incorrectly.

To Reproduce 2:
  1. Create new css file which name contains
Japanese characters.
  2. Select "Copy XML Style" or "Copy HTML Style".
  3. Paste to any texteditor which is in outside
of IDE.
       Japanese characters are appeared incorrectly.

Tips:
  - When I Copy / Paste from IDE's editor to IDE's
editor itself,
     Japanese characters are appeared correctly.
  - When I Copy / Paste from non-IDE's editor to
IDE's editor,
     Japanese characters are appeared correctly.
  - In procedure of "To Reproduce 2", If I paste
to IDE's texteditor,
     Japanese characters are appeared correctly.
     
Possibly same issue was posted in the past.
However, I post this newly, since I couldn't found
the issue
in issuezilla.
Comment 1 hiroshiy 2003-04-07 10:28:56 UTC
Adding keyword "I18N".
Comment 2 Miloslav Metelka 2003-04-09 15:45:03 UTC
I was able to reproduce.
I've found bugparade issue that gives me some useful hints:
http://developer.java.sun.com/developer/bugParade/bugs/4718897.html
and I'm trying to find a fix.
Comment 3 Miloslav Metelka 2003-04-09 18:19:06 UTC
I have compared the results to a simple JEP application - source
available at http://editor.netbeans.org/doc/KeyboardIssues/JEP.java
and I've got the same results i.e. I see the question marks instead of
the Japanese characters. So now it seems more like JDK issue but I
will continue to investigate it.
Comment 4 Miloslav Metelka 2003-04-10 09:13:54 UTC
Closing as invalid as IMO we hit JDK bug
http://developer.java.sun.com/developer/bugParade/bugs/4718897.html

I've tested workaround described in the JDK issue, but it makes no
change to the bug symptoms on my testing Ultra 10 SunOS 5.8.
 Hiroshi could you please test the workaround described in the JDK
issue on your machine. Thanks.
Comment 5 hiroshiy 2003-04-11 03:44:52 UTC
Hello,

I confirmed that workaound in "4718897" is valid with j2re.
Japanese characters were successfully pasted to dtpad in my desktop.
However, at this time, we encountered another issue.

The workaound in "4718897" is valid only on j2re.
Because, I couldn't found "flavormap.properties" in j2sdk,
although I also looked for the inside of all jars.
And as we known, IDE supports not only j2re but j2sdk.
We have to look for another workaround with j2sdk
to close this issue.

Hiroshi
Comment 6 Ken Frank 2003-04-11 04:57:53 UTC
Miloslav,
In jdk bugs (and solaris ones) related to this, it seems
that it is fixed in S9 and in mantis (is that either 1.4.0.02
or 1.4.1 or is that 1.4.2 ?)

If its fixed in those, should we not need workaround ?

Or is it that it is fixed but we need workaround until netbeans
fix for it can be done.

I'm really just trying to understand the issue since from
reading all those jdk and solaris bugs on it, it seemed to
be complex.


Thanks - Ken
Comment 7 hiroshiy 2003-04-11 05:01:36 UTC
Hello,

I've found the string in j2sdk.
And I confirmed that this workaround is also valid on j2sdk.
I'm sorry to confuse you.

Hiroshi
Comment 8 Miloslav Metelka 2003-04-11 09:56:44 UTC
AFAIK regarding JDKs:
Merlin 1.4
Hopper 1.4.1
Mantis 1.4.2
Tiger 1.5

The flavormap.properties should be under "jre/lib" in the jdk
installation.

IMHO we are unable to create NetBeans-only patch for this issue. AFAIK
the JDK's code is responsible for assigning the correct DataFlavors in
the given string Transferable.

The thing I'm confused with is that the workaround described in the
JDK issue (commenting out the COMPOUND_TEXT=... line in the
flavormap.properties) does not work on my machine for some reason. But
apparently the workaround works for Hiroshi so it's something wrong on
my side. Hiroshi could you please tell us whether you successfully
patched JDK1.4.0 or JDK1.4.1 (or both :-) ? Thanks.
Comment 9 Miloslav Metelka 2003-04-14 09:49:30 UTC
Setting resolution to wontfix. Please respond if you have any objections.
Comment 10 naveen 2003-04-14 10:17:11 UTC
I see this problem even in Linux. I'm using Studio Build: 030603,
JDK:1.4.1_02.I tried copy/paste operation of ASCII and the operastion
was sucessful in Gedit, but when I perform the same operation using
Mulibyte I don't see the paste operation happeing.

Make sure the fix provided, fixes this problem in all platforms. 
Comment 11 Miloslav Metelka 2003-04-14 10:55:55 UTC
Extract of the workaround described in
http://developer.java.sun.com/developer/bugParade/bugs/4718897.html :
1. Goto <jdk-inst-dir>/jre/lib.
2. Edit file flavormap.properties by a text editor.
3. Type '#' in front of the line starting with "COMPOUND_TEXT"
4. Restart NetBeans (or Studio).

Ken, could I ask you to test whether this helps to avoid the issue?
Thank you in advance.
Comment 12 hiroshiy 2003-04-15 05:50:42 UTC
Hello,

I've finished the confirmation about some combination of
environments and JDK versions.

  - This workaround is valid only for solaris 8,
      and this was already applyed in j2sdk142-Beta for Solaris.
  - Thus, when I use j2sdk142-Beta, this issue is not re-appeared
      on solaris 8.
      But, in Linux or solaris 9, this issue is also re-appeared.
  - I found that, this issue is also re-appeared in RedHat Linux 7.2,
     since I use non-java editor(Netscape Composer 4.x).
     In this issue, "non-java etditor" is more suitable
     than "non-IDE editor".
  - This is the problem of JDK clearly.
      And this problem is not corrected on all platforms either,
      in latest JDK.

Details are fillowings.

Hiroshi
------
In this table, "revised" means applying the followings.
  3.Type '#' in front of the line starting with "COMPOUND_TEXT"

- NetBeans on Solaris 8
  ---		---		---
  jdk		not revised	revised
  ---		---		---
  j2sdk1.4.0	re-appeared	no problems
  j2sdk1.4.1	re-appeared	no problems
  j2sdk142-Beta	no problems	n/a
  ---		---		---

- S1S on Solaris 8
  ---		---		---
  jdk		not revised	revised
  ---		---		---
  j2sdk1.4.0	re-appeared	no problems
  j2sdk1.4.1	re-appeared	no problems
  j2re1.4.1_02	re-appeared	no problems
  j2sdk142-Beta	no problems	n/a
  ---		---		---

- S1S on Solaris 9
  ---		---		---
  jdk		not revised	revised
  ---		---		---
  j2sdk1.4.0	re-appeared	re-appeared
  j2sdk1.4.1	re-appeared	re-appeared
  j2sdk142-Beta	re-appeared	n/a
  ---		---		---

- S1S on Red Hat Linux 7.2
  ---		---		---
  jdk		not revised	revised
  ---		---		---
  j2sdk1.4.0_02	re-appeared	re-appeared
  j2sdk1.4.1_02	re-appeared	re-appeared
  j2sdk142-Beta	re-appeared	re-appeared
  ---		---		---

- S1S on Windows 2000
  ---		---		---
  jdk		not revised	revised
  ---		---		---
  j2sdk1.4.1	no problems	not yet
  ---		---		---
------
Comment 13 Ken Frank 2007-05-29 18:34:39 UTC
verified using nb6.