Create your blog and photo album with postbit
Create your blog and photo album

Create new post

Content:

Upload a picture:
Tags (keywords separated by comma)

Save Cancel
The JavaScript Blog js:   Followers: 3 ; Following: 3

Explore The JavaScript Blog's photo albums:
Javascript tools (2)
Photos from posts (7)

Javascript Base 64 encoder and decoder





function utf8_to_b64( str ) {
return window.btoa(unescape(encodeURIComponent( str )));
}

function b64_to_utf8( str ) {
return decodeURIComponent(escape(window.atob( str )));
}

// Usage:
var str = '? à la mode';
var str1 = utf8_to_b64(str); // "4pyTIMOgIGxhIG1vZGU="
var str2 = b64_to_utf8(str1); // "? à la mode"


If you need an online Base64 encoder/decoder use this:
http://www.centralinternet.com.br/base64

Post by The JavaScript Blog (2012-06-21 14:15)

Post your comment:

Name: Email: Site:




| Explore users | New posts | Create your blog | Create your photo album |
| About Postbit | Our blog | Terms of use | Contact Postbit |


Copyright © 2017 - postbit.com