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.
It would be nice to implement a FileEncodingQueryImplementation for plain text files which will be able to detect the correct encoding. Here is a link to the java implementation of the Mozila's charset detection algorithm http://jchardet.sourceforge.net/ , which may be helpful for this.
Based on discussion with Tomas and based on past voc from external users, that this was something they wanted as much as they wanted the project encoding property, am putting as a defect vs enhancement - please change back to enhancement if this can't be done for nb6. ken.frank@sun.com
does it mean that at the moment, all of the below kind of nb files don't have any file encoding handling ? and is this issue about handling of encoding for all of them or just a plain text file ? (I dont know if all are considered as text files vs being other non text files) if other issues/rfe are needed, let me know. javascript css ant json jnlp ruby files ken.frank@sun.com
DefaultDataObject is handling the plain text file?
I do not think this should be implemented in openide/loaders and definitely not just for DefaultDataObject. Instead the fallback impl in ProjectEncodingQuery shall try as much as possible to guess the right type - e.g. reassigning back to Tomáš - the author of the query. Maybe we can put this into some other module, but openide/loaders are more users of the query than providers (except the trick with dataObject.getLookup(), but that is just a bridge, no real impl).
It should be implemented in the module the text data type come from,and this is not projects module. Similar case is xml module implements it for XML data object, html module for html object, ....
See kfranks' comment: > if other issues/rfe are needed, let me know. > javascript, css, ant, json, jnlp, ruby files the jnlp and ant files are XML, so ok, this should be done in XML. But for the others, we are facing a general problem, which, if we want to solve it should be solved in project/queries - e.g. the root place where the encoding API is defined.
Project/queries provides API/SPI and default fall back implementation. This module knows nothing about the content of the file. The openide/loaders provide base class for the DataObjects, so it's a natural place to put this FEQImpl in it.
openide/loaders can provide implementation for DefaultDataObject. But that does not solve the problem for other data object. I cannot fix this issue in loaders. Sorry.
I guess we agreed in caffeteria that Tomas will provide basic impl searching for unicode.
Not P2, NetBeans never had such a detection. Anyway I still think that Netbeans should have Open in Encoding action like Visual Studio. The autodetection can detect only UTF charsets.
moving opened issues from TM <= 6.1 to TM=Dev
Open|Save in encoding available in contrib.
NuclearRussian: please do not move Version forward.