From b61e0096650848a8367f3cdd21c6d7987273c334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 22 Oct 2022 19:01:34 +0200 Subject: [PATCH] #1847 Try to fix chinese PDF problem --- libsrc/gnujpdf/src/gnu/jpdf/RawPrintWriter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/gnujpdf/src/gnu/jpdf/RawPrintWriter.java b/libsrc/gnujpdf/src/gnu/jpdf/RawPrintWriter.java index 8633e336d..7ccf82ac5 100644 --- a/libsrc/gnujpdf/src/gnu/jpdf/RawPrintWriter.java +++ b/libsrc/gnujpdf/src/gnu/jpdf/RawPrintWriter.java @@ -19,7 +19,7 @@ public class RawPrintWriter { public void print(String s) { try { - os.write(s.getBytes()); + os.write(s.getBytes("UTF-8")); } catch (IOException ex) { Logger.getLogger(RawPrintWriter.class.getName()).log(Level.SEVERE, null, ex); } @@ -35,7 +35,7 @@ public class RawPrintWriter { public void println(String s) { try { - os.write((s + "\n").getBytes()); + os.write((s + "\n").getBytes("UTF-8")); } catch (IOException ex) { Logger.getLogger(RawPrintWriter.class.getName()).log(Level.SEVERE, null, ex); }