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.
There should be a way how to obtain document encoding, the encoding is needed by tools which exports the document content into other formats.
Can you tell me more about this ? Seems like a good feature to have. added I18N to synopsis for my own internal tracking also ken.frank@sun.com 07/26/04
Currently there is no way how to find the encoding for document. It causes problem to developer who writes features working with generic document (e.g. Print as HTML action should put encoding in the created HTML file, but there is no place where to get it from Document or FileObject). I propose to have EncodingQuery with getEncoding (FileObject fo) method which would return the encoding. The implementation of the query SPI will be provided by the data types.
Editor itself does not know what a value of such property should be. Editor gets the document's data from java.io.Reader passed to the EditorKit.read(). The owner of the Reader must fill in the property in the document according to the Reader's encoding. Reassigning to openide/editor.
There is no real need for cases described here (like print to HTML) as the document (in memory) is always unicode (UTF-16). For the query part, see issue 55810. *** This issue has been marked as a duplicate of 55810 ***