caught DOMException: Failed to execute ‘btoa’ on ‘Window’: The string to be encoded contains characters outside of the Latin1 range.
のエラーが出る場合、日本語文字が入っているから
エラー)
console.log( btoa( ‘あいうえお’) );
正)
console.log( btoa( unescape ( encodeURIComponent(‘あいうえお’) ) ) );
SVG出力などでも同じ