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 - I18N - Encoding should be taken into account when refactoring between projects
Summary: I18N - Encoding should be taken into account when refactoring between projects
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2007-12-26 17:44 UTC by spin
Modified: 2010-09-23 08:39 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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