Skip to content

Commit 4ae2e1f

Browse files
committed
Fix wrong Unicode encoding on unsaved sketch
Fixes #4231
1 parent 702976f commit 4ae2e1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: app/src/processing/app/SketchController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ private File saveSketchInTempFolder() throws IOException {
674674
FileUtils.copy(sketch.getFolder(), tempFolder);
675675

676676
for (SketchFile file : Stream.of(sketch.getFiles()).filter(SketchFile::isModified).collect(Collectors.toList())) {
677-
Files.write(Paths.get(tempFolder.getAbsolutePath(), file.getFileName()), file.getProgram().getBytes());
677+
Files.write(Paths.get(tempFolder.getAbsolutePath(), file.getFileName()), file.getProgram().getBytes("UTF-8"));
678678
}
679679

680680
return Paths.get(tempFolder.getAbsolutePath(), sketch.getPrimaryFile().getFileName()).toFile();

0 commit comments

Comments
 (0)