saros
saros copied to clipboard
Transfer and use file charset in resource negotiation
Currently, the file encoding is completely up to the local IDE. This can lead to issues if the local default encoding does not match the remote encoding. Furthermore, it completely relies on the IDE/project settings being synchronized as part of the session, which is no longer always the case when sharing reference points instead of projects. (Furthermore, I don't think synchronizing theses settings would work for cross-IDE sessions.)
To avoid these issue, the encoding for each file should be send and set for the local resources as part of the project negotiation. (To completely solve the encoding issue, we also have to actually always transfer the encoding for file activities if content is send and use the encoding when creating resources during a session. This is done in #913 and #914.)
While implementing this behavior, we should also keep the possible issues mentioned in #774 in mind. The implementation of this behavior could resolve #774.
Just as a reminder as you have already made changes to the encoding stuff. If you explicitly set an encoding in Eclipse for a file it is written to the meta file (and IRC it does not matter if this encoding is the same as the project/container encoding). So in the end you could end up with a very big file containing thousands of unneccessary entries.
Just as a reminder as you have already made changes to the encoding stuff. If you explicitly set an encoding in Eclipse for a file it is written to the meta file (and IRC it does not matter if this encoding is the same as the project/container encoding). So in the end you could end up with a very big file containing thousands of unneccessary entries.
When introducing the IFile method to set the encoding, I kept the old behavior for setting Eclipse encoding that only set a specific value if it does not match the project default. See EclipseFileImpl.updateFileEncoding(). As a result, only the necessary entries will be added to the encoding file.
I guess that this issues has to be fixed soon. Depending on what you share (in Eclipse) the file responsible for managing the encoding is either synchronized or not (along with other meta files like .project, .classpath) etc.