UTF8 encoding fixes (base64 encode/decode to prevent problem with how PKJS handles 2-byte characters)