Project: JDT
Bug 66479 Copy refactoring should use container encoding to create new file
Reported: 2004-06-10 06:18:48 | Status: verified fixed

I200406091200 - Platform encoding: ISO-8859-1 - Have a folder with UTF-8 encoding - Create a java class containing some double-byte characters, e.g. - any non ASCII will do - Save - Select the java file in the package explorer, and drag-copy (hold Ctrl) it within the same folder - Accept the proposed class name in the popup - Open the new class Observe, depending on the original file - The multi-byte characters have been replaced with '?'s - The file cannot be opened because it is not readable using UTF-8 Examining the file shows that it was created using the platform encoding. Acceptable would be either the encoding of the original file, or the encoding of the container (folder in this case).

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/AccessorClass.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/changes/CreateFileChange.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/changes/CreateTextFileChange.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/changes/DeleteFileChange.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/CreateCopyOfCompilationUnitChange.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractInterfaceRefactoring.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInnerToTopRefactoring.java