Incorrect crc returned for a surrogate character #5
	
		Labels
		
	
	
	
	
	
	
		No Milestone
		
			
		
	
	
		
		
		
			No project
			
				
			
		
	
	
	
	
	
		No Assignees
		
			
		
	
	
	
		1 Participants
		
	
	
		
		
			Notifications
			
				
			
		
	
	
	
	Due Date
	No due date set.
			
				Dependencies
				
				
		
	
	
	No dependencies set.
			Reference: sheetjs/js-crc32#5
			
		
	
		Loading…
	
		Reference in New Issue
	
	Block a user
	
	No description provided.
		
		Delete Branch "%!s()"
	 
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The crc for surrogate characters is not correctly computed.
Here is an example with the U+24B62 character (𤭢):
CRC32.str('𤭢')
Result: -40863161
Expected: 1512193127
Function related to this issue:
Fix:
@florentbr thanks for checking in!
A bitshift was missing. Here is the fix:
To make sure we have better test coverage, there are some new tests checking each UTF-8 character