Problems properly decoding a base64 encoded string

Looks like I may be able to remove all unprintable characters, but I’m not sure that’s going to work as far as Azure looking for the fully signed string using the full decoded shared key.