Skip to content

Commit 0b805b9

Browse files
committed
Erweiterung der Codierungsfunktionen
1 parent 573c31a commit 0b805b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Coding Puzzle/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ function handleFileSelect(event) {
77
const asciiString = convertBinaryToAscii(binaryString);
88
const unicodeString = convertBinaryToUnicode(binaryString, 'UTF-8'); // Umwandlung in UTF-8
99
const isoString = convertBinaryToUnicode(binaryString, 'ISO-8859-1'); // Umwandlung in ISO-8859-1
10+
1011
// Gib die Ergebnisse aus oder tue etwas anderes damit
1112
console.log('ASCII: ' + asciiString);
1213
console.log('Unicode: ' + unicodeString);
1314
console.log('ISO-8859-1: ' + isoString);
15+
1416
const output = document.getElementById('output');
15-
output.innerHTML = `ASCII: ${asciiString}<br>Unicode: ${unicodeString}<br>ISO-8859-1: ${isoString}`;
17+
output.innerHTML = `ASCII: ${decodeURIComponent(escape(asciiString))}<br>Unicode: ${decodeURIComponent(escape(unicodeString))}<br>ISO-8859-1: ${decodeURIComponent(escape(isoString))}`;
1618
};
1719
}
1820

0 commit comments

Comments
 (0)