summaryrefslogtreecommitdiffstats
path: root/dozentenmodul
diff options
context:
space:
mode:
authorSimon Rettberg2022-02-14 12:25:45 +0100
committerSimon Rettberg2022-02-14 12:25:45 +0100
commit372197a1dacc55aebcb42b934db76d9721e4b4fe (patch)
tree9ee6f4a21d0deba9cc127a768e3147f84794edd4 /dozentenmodul
parent[CLIENT] Do not adjust QEMU VM firmware on Windows platforms (diff)
downloadtutor-module-372197a1dacc55aebcb42b934db76d9721e4b4fe.tar.gz
tutor-module-372197a1dacc55aebcb42b934db76d9721e4b4fe.tar.xz
tutor-module-372197a1dacc55aebcb42b934db76d9721e4b4fe.zip
[client] Virtconfig editor: Use UTF-8 as default encoding for non-vmware
Diffstat (limited to 'dozentenmodul')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtConfigEditorWindow.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtConfigEditorWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtConfigEditorWindow.java
index 1818323d..cc841b16 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtConfigEditorWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtConfigEditorWindow.java
@@ -89,7 +89,11 @@ public class VirtConfigEditorWindow extends VirtConfigEditorWindowLayout impleme
final String userInput = pnlEditor.getText();
byte[] uiBytes = userInput.getBytes(StandardCharsets.ISO_8859_1);
Charset cs = VirtualizationConfigurationVmwareFileFormat.getCharset(uiBytes, uiBytes.length);
- // cs is now either the detected encoding, or latin1 as a default
+ // VMware: cs is now either the detected encoding, or latin1 as a default
+ // Other: Should be null, so let's go with UTF-8
+ if (cs == null) {
+ cs = StandardCharsets.UTF_8;
+ }
uiBytes = userInput.getBytes(cs);
// now we should have the correct bytes...
VirtualizationConfiguration virtualizationConfig = null;