forked from eclipse-platform/eclipse.platform.runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With https://openjdk.java.net/jeps/400 implemented in Java 18, "file.encoding" system property became meaningless and can't be used anymore to determine system native encoding. Unfortunately, that property was widely used in Eclipse API's and was the standard way to get default system encoding. So both org.eclipse.ui.WorkbenchEncoding.getWorkbenchDefaultEncoding() and org.eclipse.core.resources.ResourcesPlugin.getEncoding() were using this property and need now a proper replacement. The new API tries first to get the value of the "native.encoding" property (populated by Java 18), and if not there, uses internal "sun.jnu.encoding" property (used in all supported Java versions). In case neither property is set, Charset.defaultCharset() is used as fallback solution. See eclipse-platform/eclipse.platform.resources#154
- Loading branch information
1 parent
c235267
commit 10d5236
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters