caught DOMException: Failed to execute ‘btoa’ on ‘Window’: The string to be encoded contains characters outside of the Latin1 range.

投稿者:

caught DOMException: Failed to execute ‘btoa’ on ‘Window’: The string to be encoded contains characters outside of the Latin1 range.
のエラーが出る場合、日本語文字が入っているから

Thank you for reading this post, don't forget to subscribe!

エラー)
console.log( btoa( ‘あいうえお’) );

正)
console.log( btoa( unescape ( encodeURIComponent(‘あいうえお’) ) ) );

SVG出力などでも同じ