eclipse-platform / eclipse-platform/eclipse.platform

File corruption when moving file accross projects that have different charsets

Abierto
#581 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
165
Forks
174
Merge medio
2 d 8 h
PR fusionados (30 d)
22

Descripción

### 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?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Reproduce el problema siguiendo los pasos indicados de Eclipse Platform 2023-09 con dos proyectos cuyos valores de codificación predeterminados sean diferentes. Compara un archivo sin un juego de caracteres establecido explícitamente antes y después de moverlo y, a continuación, resuelve el comportamiento esperado descrito en la propuesta. Se considera terminado cuando se conserva el juego de caracteres efectivo del archivo al moverlo y las preferencias explícitas de juego de caracteres se gestionan de forma coherente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.