To prevent ‘InvalidCharacterError’ error, you need to do this:
var base64EncodedStr = btoa(unescape(encodeURIComponent(rawData)));
More Related Contents:
- How to convert Base64 String to javascript file object like as from file input form?
- Get Base64 encode file-data from Input Form
- Convert HTML to data:text/html link using JavaScript
- How to save a base64 image to user’s disk using JavaScript?
- play .wav sound file encoded in base64 with javascript
- What is the size limit of a Base64 DataURL image?
- How to download a base64-encoded image?
- how to display base64 encoded pdf?
- How to add a black shadow on top of a div block with background image?
- Creating a textarea with auto-resize
- HTML button to NOT submit form
- How to load all the images from one of my folder into my web page, using Jquery/Javascript
- Does the onchange event propagate?
- width/height after transform
- How to get file name when user select a file via ?
- Enable/Disable submit button if checkbox is checked/unchecked?
- Convert Text to Image using javascript [closed]
- Div Z-Index issue with Flash movie
- createElement vs. createElementNS
- addEventListener for keydown on Canvas
- GoogleMaps does not load on page load
- bootstrap popover not showing on top of all elements
- How to pass variable value between different html pages in javascript
- Get all elements in the body tag using pure javascript
- Force page zoom at 100% with JS
- How do I detect when a web page is loaded?
- Simple HTML sanitizer in Javascript [closed]
- Dynamically Trigger HTML5 Cache Manifest file?
- Google Maps API v3 Highlight Country Border without using Polygons
- Validate Dynamically Added Input fields