Bug 124463 - I18N - Encoding should be taken into account when refactoring between projects
I18N - Encoding should be taken into account when refactoring between projects
Status: NEW
Product: java
Classification: Unclassified
Component: Refactoring
6.x
PC Windows XP
: P3 (vote)
: TBD
Assigned To: Jan Becicka
issues@java
JA_COMMUNITY
: I18N
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo