Skip to content

Commit

Permalink
Merge pull request #10530 from a4lg/fix-copytext-outofucs2
Browse files Browse the repository at this point in the history
Fix copying on supplementary plane characters
  • Loading branch information
timvandermeij authored Feb 10, 2019
2 parents 6757b6e + 96ba6af commit dfe7d9b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
continue;
}
}
toUnicode[charcode] = String.fromCharCode(code);
toUnicode[charcode] = String.fromCodePoint(code);
}
continue;
}
Expand Down Expand Up @@ -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);
});
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
!issue9940.pdf
!issue10388_reduced.pdf
!issue10438_reduced.pdf
!issue10529.pdf
!bad-PageLabels.pdf
!decodeACSuccessive.pdf
!filled-background.pdf
Expand Down
Binary file added test/pdfs/issue10529.pdf
Binary file not shown.
7 changes: 7 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit dfe7d9b

Please sign in to comment.