twalthr commented on a change in pull request #6579: [FLINK-10174][table] fix
getbytes in hex and toBase64
URL: https://github.com/apache/flink/pull/6579#discussion_r211164909
##########
File path:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/functions/ScalarFunctions.scala
##########
@@ -211,7 +212,7 @@ object ScalarFunctions {
/**
* Returns the base64-encoded result of the input string.
*/
- def toBase64(base: String): String =
Base64.encodeBase64String(base.getBytes())
+ def toBase64(base: String): String =
Base64.encodeBase64String(base.getBytes(Charsets.UTF_8))
Review comment:
Can you also add the charset to `fromBase64`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services