Skip to content

Instantly share code, notes, and snippets.

@outlyer
Created September 11, 2023 12:30
Show Gist options
  • Save outlyer/4d317caa1d24537744e391590793239c to your computer and use it in GitHub Desktop.
Save outlyer/4d317caa1d24537744e391590793239c to your computer and use it in GitHub Desktop.
Fix HTML Entity Encoding
const fixEncoding = s => new TextDecoder().decode(new Uint8Array(s.split('').map(r=>r.charCodeAt())))
console.log(fixEncoding('Além'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment