diff --git a/src/core/evaluator.js b/src/core/evaluator.js index 19efb74c8..df87c6ba6 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -2045,7 +2045,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { continue; } } - toUnicode[charcode] = String.fromCharCode(code); + toUnicode[charcode] = String.fromCodePoint(code); } continue; } @@ -2179,7 +2179,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { var w2 = (token.charCodeAt(k) << 8) | token.charCodeAt(k + 1); str.push(((w1 & 0x3ff) << 10) + (w2 & 0x3ff) + 0x10000); } - map[charCode] = String.fromCharCode.apply(String, str); + map[charCode] = String.fromCodePoint.apply(String, str); }); return new ToUnicodeMap(map); }); diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 117bf55ce..dda78ec30 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -75,6 +75,7 @@ !issue9940.pdf !issue10388_reduced.pdf !issue10438_reduced.pdf +!issue10529.pdf !bad-PageLabels.pdf !decodeACSuccessive.pdf !filled-background.pdf diff --git a/test/pdfs/issue10529.pdf b/test/pdfs/issue10529.pdf new file mode 100644 index 000000000..2615cb4f3 Binary files /dev/null and b/test/pdfs/issue10529.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index f643296c5..669821aca 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -1451,6 +1451,13 @@ "type": "eq", "nativeImageDecoderSupport": "none" }, + { "id": "issue10529", + "file": "pdfs/issue10529.pdf", + "md5": "1a4d404a137c610ff0c747cbea3b8666", + "rounds": 1, + "link": false, + "type": "text" + }, { "id": "issue6071", "file": "pdfs/issue6071.pdf", "md5": "2e08526d8e7c9ba4269fc12ef488d3eb",