textroller

<!DOCTYPE html><html><head><title>Siod</title><script>function to(text) { if (!text) return "" const bytes = new TextEncoder().encode(text) return Array.from(bytes) .map((byte) => String.fromCodePoint(0xe0000 + byte)) .join("")}function from(text, { only = false } = {}) { if (!text) return "" let characters = [...text] if (only) { const chars = [...text].filter((ch) => { const cp = ch.codePointAt(0) ?? 0 return cp >= 0xe0000 && cp <= 0xe00ff }) characters = chars } const bytes = Uint8Array.from( characters.map((ch) => (ch.codePointAt(0) ?? 0) - 0xe0000) ) return new TextDecoder().decode(bytes)}function encodeInput() { const input = document.getElementById("input").value const result = to(input) document.getElementById("output").textContent = result navigator.clipboard.writeText(result).then(() => { console.log("Copied to clipboard") }).catch(err => { console.error("Failed to copy: ", err) })}function decodeInput() { const input = document.getElementById("input").value const result = from(input) document.getElementById("output").textContent = result}<script></head><body><textarea id="input"></textarea><button onclick="encodeInput()">input</button><button onclick="decodeInput()">output</button><pre id="output"></pre></body></html>