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 200398 - [70cat] org.openide.text.DataEditorSupport$1: The file cannot be safely opened with encoding windows-1252. Do you want to continue opening it?
Summary: [70cat] org.openide.text.DataEditorSupport$1: The file cannot be safely opene...
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-26 18:35 UTC by enydrueda
Modified: 2011-11-07 10:34 UTC (History)
14 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 180144


Attachments
stacktrace (1.22 KB, text/plain)
2011-07-26 18:35 UTC, enydrueda
Details
stacktrace (2.96 KB, text/plain)
2011-09-24 00:52 UTC, adam_myatt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description enydrueda 2011-07-26 18:35:45 UTC
This bug was originally marked as duplicate of bug 198577, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.0 (Build nbms-and-javadoc-7588-on-20110726)
VM: Java HotSpot(TM) Client VM, 20.1-b02, Java(TM) SE Runtime Environment, 1.6.0_26-b03
OS: Windows 7

User Comments:
enydrueda: open python project, and another with git plugin

GUEST: index.php

line
-----------------------
require_once("config.php");
---------------------------
ctrl+click on "config.php"

gtzabari: Exception thrown when attempting to open file. File does not open.

GUEST: click with shift key over a function.

cristian_radulescu: CTRL+click to open class of instantiated object

GUEST: Navigate -> Find Declaration on a function in PHP file




Stacktrace: 
org.openide.text.DataEditorSupport$1: The file cannot be safely opened with encoding windows-1252. Do you want to continue opening it?
   at org.openide.text.DataEditorSupport.createAndThrowIncorrectCharsetUQE(DataEditorSupport.java:455)
   at org.openide.text.DataEditorSupport.loadFromStreamToKit(DataEditorSupport.java:446)
   at org.openide.text.CloneableEditorSupport.loadDocument(CloneableEditorSupport.java:2156)
   at org.openide.text.CloneableEditorSupport.access$2800(CloneableEditorSupport.java:133)
   at org.openide.text.CloneableEditorSupport$Listener.run(CloneableEditorSupport.java:2986)
   at org.openide.text.CloneableEditorSupport$3.doRun(CloneableEditorSupport.java:710)
Comment 1 enydrueda 2011-07-26 18:35:48 UTC
Created attachment 109625 [details]
stacktrace
Comment 2 adam_myatt 2011-09-24 00:52:24 UTC
Created attachment 111127 [details]
stacktrace

Running the EasyPMD tool using the Tasks window on a large project. Exception was thrown while waiting for Tasks window to refresh during EasyPMD scan.
Comment 3 Vladimir Voskresensky 2011-11-07 10:34:10 UTC
Can you attach problematic file? Most probably it is really can not be correctly displayed in win1252

+ sometimes such situation is normal, so code in 
gianlucacosta86.easypmd2.ide.IdeScanner.scan
should be rewritten as 
try {
 analyzer = new GuardedSectionsAnalyzer(.....);
} catch (UserQuestionException e) {
 e.confirm();
 analyzer = new GuardedSectionsAnalyzer(.....);
}

because it could be the issue not only with encoding, but with big files as well. (big files also through UserQuestionException)