smartprocure / csv-generator-client

Library to generate downloadable csv files from client side data.
MIT License
6 stars 1 forks source link

UTF-8 support problem #23

Open kdragowski opened 5 years ago

kdragowski commented 5 years ago

When I try generate file in Chrome 69.0.3497.100 from data in UTF-8 character encoding a get error

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

According to https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem there are two ways to solve the problem with utf-8 encoding support