PageSourceSearch

https://www.spree-pension.de/inc/js/KMfunctions/utf8_tools.js?vers=1786611428

js spree-pension.de collected 2026-10-08 19:03:27 UTC 1,718 bytes, 60 lines download raw bytes

1/************************************
2 *								  *
3 * En-/Decoding functions for UTF-8 *
4 *								  *
5 * @author: selfhtml				*
6 *								  *
7 ************************************/
8
9
10function encode_utf8(plainstring)
11{
12	// dient der Normalisierung des Zeilenumbruchs
13	plainstring = plainstring.replace(/\r\n/g,'\n');
14	var u8string = '';
15	for(var i = 0; i < plainstring.length; i++)
16		{
17		// ermitteln des Unicodes des  aktuellen Zeichens
18		var plainchar = plainstring.charCodeAt(i);
19		// alle Zeichen von 0-127 => 1byte
20		if(plainchar < 128)
21		u8string += String.fromCharCode(plainchar);
22		// alle Zeichen von 127 bis 2047 => 2byte
23		else if((plainchar > 127) && (plainchar < 2048)) {
24		u8string += String.fromCharCode((plainchar >> 6) | 192);
25		u8string += String.fromCharCode((plainchar & 63) | 128);}
26		// alle Zeichen von 2048 bis 66536 => 3byte
27		else {
28		u8string += String.fromCharCode((plainchar >> 12) | 224);
29		u8string += String.fromCharCode(((plainchar >> 6) & 63) | 128);
30		u8string += String.fromCharCode((plainchar & 63) | 128);}
31		}
32	return u8string;
33}
34
35function decode_utf8(u8string) {
36	var plainstring = '';
37	var i = 0;
38	var c = c1 = c2 = 0;
39	// while-Schleife, weil einige Zeichen uebersprungen werden
40	while(i < u8string.length)
41	{
42		c = u8string.charCodeAt(i);
43		if(c < 128) {
44			plainstring += String.fromCharCode(c);
45			i++;
46		}
47		else if((c > 191) && (c < 224)) {
48			c2 = u8string.charCodeAt(i + 1);
49			plainstring += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
50			i += 2;
51		}
52		else {
53			c2 = u8string.charCodeAt(i + 1);
54			c3 = u8string.charCodeAt(i + 2);
55			plainstring += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
56			i += 3;
57		}
58	}
59	return plainstring;
60}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.