Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const clean = 'bullshit';
let dirty = '';
for (const letter of clean) {
const hex = letter.charCodeAt().toString(16);
dirty = dirty + unescape(`%uDB40%uDD${hex}`);
console.log(`Clean: ${clean}`);
console.log(`Dirty: ${dirty}`);
console.log(`Stripped: ${unescape(escape(dirty).replace(/u.{8}/g,''))}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment