Skip to content

Commit 9b6682d

Browse files
committed
WCAG. Add REPLACEMENT_CHARACTER_STRING to ChunkParser
1 parent fcbf9f2 commit 9b6682d

File tree

1 file changed

+3
-1
lines changed
  • wcag-validation/src/main/java/org/verapdf/gf/model/factory/chunks

1 file changed

+3
-1
lines changed

wcag-validation/src/main/java/org/verapdf/gf/model/factory/chunks/ChunkParser.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
class ChunkParser {
5555

5656
private static final Logger LOGGER = Logger.getLogger(ChunkParser.class.getName());
57+
58+
public static final String REPLACEMENT_CHARACTER_STRING = "\uFFFD";
5759

5860
private final Deque<GraphicsState> graphicsStateStack = new ArrayDeque<>();
5961
private final Stack<Long> markedContentStack = new Stack<>();
@@ -805,7 +807,7 @@ private void parseString(COSString string, StringBuilder unicodeValue, TextPiece
805807
value != null ? value.length() : 0);
806808
}
807809
}
808-
String result = value != null ? value : (StaticContainers.getIsIgnoreCharactersWithoutUnicode() ? "" : "\u0000");
810+
String result = value != null ? value : (StaticContainers.getIsIgnoreCharactersWithoutUnicode() ? "" : REPLACEMENT_CHARACTER_STRING);
809811
if (textPieces == null) {
810812
unicodeValue.append(result);
811813
} else {

0 commit comments

Comments
 (0)