eclipse-platform / eclipse-platform/eclipse.platform

File corruption when moving file accross projects that have different charsets

Offen
#581 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
165
Forks
174
Ø Merge
2 T. 8 Std.
Gemergte PRs (30 T.)
22

Beschreibung

### Current Behaviour
When moving a file across two projects with different charsets, a file with no specified charset gets corrupted.

### Reproducing*
```
Version: 2023-09 (4.29)
Build id: I20230711-0440
```
1) Create two projects
2) Set the default encodings of the projects, set them to different charsets
3) Create a file in one project
4) Move the file from one project to the other
5) See the File's implied charset not match the old implied charset

### Expected Behaviour
I propose this behaviour:
- When moving a file without explicitly set charset into a project where the new implicit charset would conflict with the current implicit charset, the old charset is set to an explicit charset in the file
- When moving a file with explicitly set charset into a project which has the same default charset as the explicitly set charset, unset the charset preference

--
This issue mirrors [this](https://bugs.eclipse.org/bugs/show_bug.cgi?id=380114) issue.
What do you think is the expected behaviour here? Do you agree with my proposal?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduziere das Problem anhand der aufgeführten Schritte für Eclipse Platform 2023-09 mit zwei Projekten, deren Standardkodierungen sich unterscheiden. Vergleiche eine Datei ohne explizit festgelegten Zeichensatz vor und nach dem Verschieben und stelle anschließend das im Vorschlag beschriebene erwartete Verhalten her. Als erledigt gilt die Aufgabe, wenn der effektive Zeichensatz der Datei beim Verschieben erhalten bleibt und explizite Zeichensatzpräferenzen konsistent behandelt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.