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
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
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
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 ***