Skip to content

Commit 25a3282

Browse files
author
Benoit Lagae
committed
Fix incorrect unicode form field names
DEVSIX-1357
1 parent c4c121e commit 25a3282

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

forms/src/main/java/com/itextpdf/forms/PdfAcroForm.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,10 +845,10 @@ private Map<String, PdfFormField> iterateFields(PdfArray array, Map<String, PdfF
845845
parentField = PdfFormField.makeFormField(parentField.getParent(), document);
846846
}
847847
}
848-
name = fieldName.toUnicodeString() + "." + index;
848+
name = fieldName.toString() + "." + index;
849849
index++;
850850
} else {
851-
name = fieldName.toUnicodeString();
851+
name = fieldName.toString();
852852
}
853853
fields.put(name, formField);
854854
if (formField.getKids() != null) {

forms/src/test/java/com/itextpdf/forms/PdfFormFieldTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void unicodeFormFieldTest() throws IOException {
139139
String fieldName = "\u5E10\u53F71"; // 帐号1: account number 1
140140
Assert.assertEquals(formFields.keySet().toArray(new String[1])[0], fieldName);
141141
}
142-
142+
143143
@Test
144144
public void unicodeFormFieldTest2() throws IOException {
145145
String filename = sourceFolder + "unicodeFormFieldFile.pdf";

0 commit comments

Comments
 (0)