| Summary: | [GlobalActions] [encoding] Convert content when change encoding | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Csaba Horvath <hcs333> |
| Component: | IDE | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | daniel_megert, david_williams, eclipse, markus.kell.r, nobody, raszagar |
| Version: | 3.0 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | stalebug | ||
|
Description
Csaba Horvath
Eclipse Platform Version: 3.2.0 Build id: M20060921-0945 SO: Windows XP I test this version in PDT (PHP develoment tool) 0.7 Stable Build: S20070130-RC2, package All-in-One for windows. When I open a text file (php) containing accented chars (á,é,...) or tilde (ñ), this characters show wrong. Example: año = a�o mínimo = m�nimo Note: if you select Edit->Encoding->ISO-8859-1 this characters show fine, but if you edit text file and forget change enconding option the file will be saved with wrong characters (�). The text editor only reacts on the encoding change issued by the org.eclipse.ui.ide.dialogs.ResourceEncodingFieldEditor. If Eclipse decides to always (or optionally via setting) try to convert the file content then this is up to this class. The editor would pick up such a content change. Moving to Platform UI. NOTE: 1) doing such a conversion can be dangerous and can result in lost data. See also bug 269314. 2) the new feature would probably have to go into org.eclipse.ui.ide.dialogs.AbstractEncodingFieldEditor as the org.eclipse.ui.ide.dialogs.EncodingFieldEditor is also affected Note that "Convert Encoding" is different from "Set Encoding", so "Convert Encoding" needs to be a separate operation. The combo in the the resource properties dialog should *not* change the encoding. The Resource page should only change meta-information about the resource, so it's doing a "Set Encoding" operation. There should rather be an additional "Convert Encoding" command that converts the encoding of selected files (similar to "File > Convert Line Delimiters To"). The implementation could use the refactoring framework to give the user a preview of the changes and to provide an undo. >There should rather be an additional "Convert Encoding" command that converts
Yes, either that or a check box on the current dialog as several people already now expect the conversion to happen.
http://artur.ejsmont.org/blog/Convertig-file-encoding-to-UTF-8-from-other-Unicode-and-removing-Byte-Order-Marks provides a good workaround for this. *** Bug 462316 has been marked as a duplicate of this bug. *** 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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. -- The automated Eclipse Genie. |