Bug 86545 - [implementation] Use new IFile.getCharsetFor API
Summary: [implementation] Use new IFile.getCharsetFor API
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-24 14:54 EST by Dani Megert CLA
Modified: 2019-09-06 16:13 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2005-02-24 14:54:04 EST
Use the requested API.
Comment 1 Dani Megert CLA 2005-06-04 12:39:26 EDT
There's no added value in doing this for 3.1 but involves some risks and testing
effort. Deferring to 3.2.
Comment 2 Dani Megert CLA 2006-10-10 07:14:33 EDT
The problem with the new API is that it "destroys" a BOM that's in the original file i.e. the BOM might get lost. Our current code takes care of this. We either need to combine our solution with the new API or ask to fine tune the API.

Not a high priority tough since there's no added value.

For more details see the original feature request: bug 60636.
Comment 3 David Williams CLA 2006-10-10 09:50:13 EDT
Dani, so, are you saying the API is not adequate? That the description properties must maintain the BOM (I thought it did). 

Just want to make sure if there's issues, they are all documented so a common solution can exists. 
Comment 4 Dani Megert CLA 2006-10-10 09:58:02 EDT
What makes you think that the description properties are used by that API?
Comment 5 David Williams CLA 2006-10-10 10:44:22 EDT
(In reply to comment #4)
> What makes you think that the description properties are used by that API?
> 

Which API are we talking about? I meant it was maintained if/when you use getCharset (or, getProperty(Btye_Order_Mark) for a ContentDesciption)). .... and I thought 
bug 60636 was all about "providing it when saving" ... so ... I'm probably lost and don't understand what you are talking about. 

My _main_ question, is there a common, APIish way to save files with right charset, and with or without BOMs? If so, great. If not, then that's what I thought should be documented as still being needed. 
Comment 6 Dani Megert CLA 2006-10-10 10:52:54 EDT
I was talking about IFile.getCharsetFor(...) API. To be honest I did not try it out yet but from what I read now in the Javadoc I don't *think* it will do the trick and since the document provider and the file buffers do it right on save (i.e. preserve the BOM) and given the constraint resources I have, I do not want to invest time on this - hence marked LATER.

Ideally IFile.getCharsetFor(...) *should* do what you ask for (when saving) but I doubt it keeps/returns the BOM. Once this is investigated and confirmed we need to reopen bug 60636.
Comment 7 Dani Megert CLA 2007-06-22 09:59:23 EDT
Get rid of deprecated state.
Comment 8 Eclipse Webmaster CLA 2019-09-06 16:13:48 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.