This PR explicitly converts a query parameter value to UTF-8 before encoding the value to base64. Without specifying the encoding scheme explicitly, the behavior of getBytes() and the subsequent String instantiation would be platform dependent, which can result in incorrectly-encoded values. By specifying UTF-8, we can ensure the results regardless of the default charset of the calling system.
Fixes #35
This PR explicitly converts a query parameter value to UTF-8 before encoding the value to base64. Without specifying the encoding scheme explicitly, the behavior of
getBytes()
and the subsequentString
instantiation would be platform dependent, which can result in incorrectly-encoded values. By specifyingUTF-8
, we can ensure the results regardless of the default charset of the calling system. Fixes #35