It seems not support Unicode
luke-yeah opened this issue · 1 comments
luke-yeah commented
For example:
Use this words as an input:
Base 64 \u2014 Mozilla Developer Network
Add a test case such as:
it('encode "Base 64 \u2014 Mozilla Developer Network"', () => equal(encode(stringArrayBuffer("Base 64 \u2014 Mozilla Developer Network")), "QmFzZSA2NCDigJQgTW96aWxsYSBEZXZlbG9wZXIgTmV0d29yaw=="))
The result is
+ expected - actual
+QmFzZSA2NCDigJQgTW96aWxsYSBEZXZlbG9wZXIgTmV0d29yaw==
-QmFzZSA2NCAUIE1vemlsbGEgRGV2ZWxvcGVyIE5ldHdvcms=
niklasvh commented
This library converts between base64 and arraybuffers. Your example is a string with unicode.