3
For a few days now, I’ve noticed that Netbeans is changing accented characters in my code. Apparently, it only does this in the class that was opened when I closed Netbeans. That is, I am editing two classes and I close Netbeans. When reopened, the class that is in evidence (open) is with the accented characters messy.
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Mês/Ano inválido!"));
- Netbeans 8.0.1
- Windows 7 64bits
- Source code coding: UTF-8
What can it be?
Opa, right-clicking on your project, in the menu
Properties
, theencoding
is also set toUTF-8
?– Anthony Accioly
Yeah, it’s also UTF-8
– NilsonUehara
I noticed that these changes occur only in Java classes, XHTML does not. I noticed tmb that when I open the Netbeans IDE and notice that the accents have been changed, I can close the class and restart the Netbeans IDE and reopen the class that the code with wrong accents was not "saved"
– NilsonUehara
Dude, really weird. One possible attempt is to delete the folder
%HOMEPATH%\.nbi
(this will reset the Netbeans settings), maybe even reinstall the IDE or do a downgrade. Another thing is to try to erase any specific Netbeans proprietary files in the Project and "reimport" the project code inside. This looks like a corrupted configuration or some plugin that soured the IDE.– Anthony Accioly
Have you tried setting the charset to UTF-8 in the Netbeans configuration file? If I’m not mistaken just add the parameter
-J-Dfile.encoding=UTF-8
in the optionnetbeans_default_options
inside the archive$DIRETORIO_NETBEANS/etc/netbeans.conf
.– gabrielhof
Some other directories that are good candidates to be deleted
%HOMEPATH%\AppData\Local\NetBeans\Cache
and%HOMEPATH%\AppData\Roaming\NetBeans
.– Anthony Accioly
@gabrielhof It looks like you killed the riddle! Thank you tmb to Anthony Accioly
– NilsonUehara
Hehe, put the answer to people with this same problem :D
– gabrielhof