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 37182 - I18N - There is no way how to obtain document encoding
Summary: I18N - There is no way how to obtain document encoding
Status: RESOLVED DUPLICATE of bug 55810
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2003-11-13 08:44 UTC by Tomas Zezula
Modified: 2008-12-22 19:19 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2003-11-13 08:44:48 UTC
There should be a way how to obtain document
encoding, the encoding is needed by tools which
exports the document content into other formats.
Comment 1 Ken Frank 2004-07-26 21:17:23 UTC
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
Comment 2 Tomas Zezula 2004-07-27 13:59:05 UTC
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.
Comment 3 Miloslav Metelka 2006-01-30 17:55:34 UTC
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.
Comment 4 Petr Nejedly 2006-01-31 09:39:09 UTC
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 ***