Merge pull request #10530 from a4lg/fix-copytext-outofucs2
Fix copying on supplementary plane characters
This commit is contained in:
		
						commit
						dfe7d9bc26
					
				@ -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);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								test/pdfs/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								test/pdfs/.gitignore
									
									
									
									
										vendored
									
									
								
							@ -75,6 +75,7 @@
 | 
			
		||||
!issue9940.pdf
 | 
			
		||||
!issue10388_reduced.pdf
 | 
			
		||||
!issue10438_reduced.pdf
 | 
			
		||||
!issue10529.pdf
 | 
			
		||||
!bad-PageLabels.pdf
 | 
			
		||||
!decodeACSuccessive.pdf
 | 
			
		||||
!filled-background.pdf
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								test/pdfs/issue10529.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								test/pdfs/issue10529.pdf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@ -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",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user