eclipse-platform / eclipse-platform/eclipse.platform
File corruption when moving file accross projects that have different charsets
- 主要言語
- Java
- スター
- 165
- フォーク
- 174
- 平均マージ
- 2日 8時間
- マージ済み PR(30日)
- 22
説明
### 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?
コントリビューションガイド
調査の方向性
デフォルトのエンコーディングが異なる2つのプロジェクトを使用し、記載されている Eclipse Platform 2023-09 の手順で問題を再現します。明示的に設定された charset がないファイルについて、移動前と移動後を比較し、その後、提案で説明されている期待される動作を解決します。完了条件は、移動後もファイルの実効 charset が保持され、明示的な charset の設定が一貫して処理されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100