forked from sheetjs/sheetjs
		
	- read MSO HTML (fixes #419 h/t @vineetl fixes #458 h/t @tienne) - roll out xml namespace fix (closes #362 h/t @PierreOCXP) - cellDates clarifications
		
			
				
	
	
		
			21 lines
		
	
	
		
			841 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			841 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
var parse_text_p = function(text, tag) {
 | 
						|
	return unescapexml(text.replace(/<text:s\/>/g," ").replace(/<[^>]*>/g,""));
 | 
						|
};
 | 
						|
 | 
						|
var utf8read = function utf8reada(orig/*:string*/)/*:string*/ {
 | 
						|
	var out = "", i = 0, c = 0, d = 0, e = 0, f = 0, w = 0;
 | 
						|
	while (i < orig.length) {
 | 
						|
		c = orig.charCodeAt(i++);
 | 
						|
		if (c < 128) { out += String.fromCharCode(c); continue; }
 | 
						|
		d = orig.charCodeAt(i++);
 | 
						|
		if (c>191 && c<224) { out += String.fromCharCode(((c & 31) << 6) | (d & 63)); continue; }
 | 
						|
		e = orig.charCodeAt(i++);
 | 
						|
		if (c < 240) { out += String.fromCharCode(((c & 15) << 12) | ((d & 63) << 6) | (e & 63)); continue; }
 | 
						|
		f = orig.charCodeAt(i++);
 | 
						|
		w = (((c & 7) << 18) | ((d & 63) << 12) | ((e & 63) << 6) | (f & 63))-65536;
 | 
						|
		out += String.fromCharCode(0xD800 + ((w>>>10)&1023));
 | 
						|
		out += String.fromCharCode(0xDC00 + (w&1023));
 | 
						|
	}
 | 
						|
	return out;
 | 
						|
};
 |