playgameservices/type-a-number-js — pull request #4 by zigah (2013-11-03 15:25:20+00:00)
Title: Replaced btoa and atob that have a problem with handling Unicode characters with code by Johan Sundström.

These two new functions in b64Utils.js are intended to replace btoa and atob that have a problem with handling Unicode caharacters in a player's g+ name - like mine :P - and throw an exception, which prevents the Brag button to populate.

The functions below were effectively copy pasted from ecmanaut.blogspot.com
as suggested by MDN: https://developer.mozilla.org/en-US/docs/Web/API/window.btoa
and written by Johan Sundström:

"In most browsers, calling window.btoa on a Unicode string
will cause a Character Out Of Range exception.
To avoid this, consider this pattern, noted by Johan Sundström:"
http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html