Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-core-dev] file encoding proposal

1. Just because you don't see the need for a per-file encoding attribute doesn't mean you should make it impossible an IContentInterpreter to have one (or other levels of granularity). The fileEncoding parameter should be changed in name and semantics to "String uri". (Not a "file path" or you'll be committing another kind of sin.)

2. The extension (which should be a URI) doesn't seem to be passed to an IContentInterpreter. ???

3. How does a plugin or user override the platform-provided "implementations of IContentInterpreters for xml and other popular file formats"? Not that we don't trust you, but we don't want to exchange one hard-coded scheme for another.

4. The UI Changes section seems to allude to features not described elsewhere in the document. Project encoding? What does it mean? The paragraph identified (5) below makes me very nervous.

5. The third "scenario" is not a use case. It is an inconclusive note about how to set encodings for newly created files. Several sentences in this paragraph are either incorrect or worrying. a. Every file (not just a new file) should get an encoding from an IContentInterpreter in the process of being saved. But you have boxed yourself in by allowing only inputstreams to be considered. For output, you need a method that accepts a Reader. b. All *.xml files do NOT have a UTF-8 encoding. They should always have the encoding in the xml/encoding declaration, if one is present.

6. You do not specify error handling for cases when the encoding used for input or output is detected to be wrong or insufficient. The user should at least be warned.

7. Where is this stuff actually used? I checked the obvious documentprovider classes in M7 and didn't see it.

Bob

Rafael Chaves wrote:
A new revision of the improved file encoding proposal has been made available off the Platform/Core web page:

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-core-home/dev.html#plan_current

Comments are welcome and should be made on the Platform/Core development list (platform-core-dev@xxxxxxxxxxx) or the corresponding Bugzilla PR (#37933).

Thanks,

Rafael




Back to the top