So as described in #602, it isnt able to properly encode non-latin1 characters and btoa fails to encode it.
TextEncoder nets you the underlying utf8 bytes, which btoa is also not able to handle directly. But I did take @allisonkarlitskaya suggestion and didnt rely on cockpit.base64_encode, instead just apply every byte as its own character to btoa.
I have added a test, but I have tried to use the tasks container to run it, but I keep getting failures that I cant figure out. I think it is environmental issue, and has nothing to do with the test harness itself.
So as described in #602, it isnt able to properly encode non-latin1 characters and
btoa
fails to encode it.TextEncoder
nets you the underlying utf8 bytes, whichbtoa
is also not able to handle directly. But I did take @allisonkarlitskaya suggestion and didnt rely oncockpit.base64_encode
, instead just apply every byte as its own character to btoa.I have added a test, but I have tried to use the tasks container to run it, but I keep getting failures that I cant figure out. I think it is environmental issue, and has nothing to do with the test harness itself.