gnujpdf - use UTF-8 in string.getBytes() everywhere

This commit is contained in:
Jindra Petřík
2022-10-22 21:15:20 +02:00
parent ef2ccab594
commit 31a461ca96
19 changed files with 304 additions and 305 deletions

View File

@@ -79,14 +79,14 @@ public class PDFPageList extends PDFObject {
// now the objects body
// the Kids array
os.write("/Kids ".getBytes());
os.write(PDFObject.toArray(pages).getBytes());
os.write("\n".getBytes());
os.write("/Kids ".getBytes("UTF-8"));
os.write(PDFObject.toArray(pages).getBytes("UTF-8"));
os.write("\n".getBytes("UTF-8"));
// the number of Kids in this document
os.write("/Count ".getBytes());
os.write(Integer.toString(pages.size()).getBytes());
os.write("\n".getBytes());
os.write("/Count ".getBytes("UTF-8"));
os.write(Integer.toString(pages.size()).getBytes("UTF-8"));
os.write("\n".getBytes("UTF-8"));
// finish off with its footer
writeEnd(os);