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 124463

Summary: I18N - Encoding should be taken into account when refactoring between projects
Product: java Reporter: spin <spin>
Component: RefactoringAssignee: Jan Becicka <jbecicka>
Status: NEW ---    
Severity: blocker CC: g11n, kfrank
Priority: P3 Keywords: I18N
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

Description spin 2007-12-26 17:44:32 UTC
This bug can be reproduced by Refactor-copying java classes between projects with different encodings. Take for 
instance this javadoc comment taken from project A (default encoding is windows-1252)

/**
 * Esta excepción se lanza para indicar que ocurrió un error al inicializar
 * el componente.
 */

If the class is copied to another project with UTF-8 as it's default encoding, the comment appears corrupted:

/**
 * Esta excepci�n se lanza para indicar que ocurri� un error al inicializar
 * el componente.
 */

This of course would also happen if the class' file was copied by hand (without refactoring) from one project to 
another, but I believe text encoding should be "refactored" along with the rest of the class. Maybe add an option to 
enabe/disable this feature?
Comment 1 Ken Frank 2008-01-11 21:13:37 UTC
I think its true that encoding detection is not done on files vs
using the encoding of the project (except for files like html, jsp, xml
that have such a property)


that is its assumed that all files used will be in the encoding of the project
or changed to that encoding first.

but it seems like a helpful rfe.

there is an experimental module that allows saving or reading a project in another encoding
but I don't know if it would help here since its just wanting to use the class of the file
in other project ?

ken.frank@sun.com