vivek-nexus / transcriptonic

Simple Google Meet transcripts. Private and open source.
https://chromewebstore.google.com/detail/ciepnfnceimjehngolkijpnbappkkiag
MIT License
24 stars 9 forks source link

[fix] Add unicode support #4

Closed ifTNT closed 5 months ago

ifTNT commented 5 months ago

Since btoa interprets the code points of its input string as byte values, calling btoa on a string will cause a "Character Out Of Range" exception if a character's code point exceeds 0xff.

This patch replaces the btoa with the recommended solution from MDN, which encodes the Unicode string to the single-byte representation before passing it to btoa.

Reference: https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem

vivek-nexus commented 5 months ago

Thanks @ifTNT for your contribution! Will publish this to chrome store soon after a little bit of testing.