Convert text to Base64 and back, with proper UTF-8 handling.
That doesn't look like valid Base64.
Encoding runs text through TextEncoder before btoa() so multi-byte characters like accents and emoji survive the round trip - plain btoa() alone corrupts anything outside basic ASCII.