mirror of
				https://github.com/stedolan/jq.git
				synced 2024-05-11 05:55:39 +00:00 
			
		
		
		
	In particular, parse bad UTF8 by replacing the broken bits with U+FFFD and resychronise correctly after broken sequences.
		
			
				
	
	
		
			12 lines
		
	
	
		
			318 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			318 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef JV_UNICODE_H
 | |
| #define JV_UNICODE_H
 | |
| 
 | |
| const char* jvp_utf8_next(const char* in, const char* end, int* codepoint);
 | |
| int jvp_utf8_is_valid(const char* in, const char* end);
 | |
| 
 | |
| int jvp_utf8_decode_length(char startchar);
 | |
| 
 | |
| int jvp_utf8_encode_length(int codepoint);
 | |
| int jvp_utf8_encode(int codepoint, char* out);
 | |
| #endif
 |