1
1
mirror of https://github.com/wader/fq.git synced 2024-09-11 20:07:11 +03:00
fq/format/text
Platon Pronko b0e4da28de fix non-ascii characters handling in to_hex and to_base64 functions
to_hex and to_base64 functions were expecting `string` as an input type,
which caused the value to be CastFn'ed to string,
which in turn resulted in raw bytes being cast to []rune (in makeDecodeValueOut).
This operation replaces invalid UTF-8 bytes with 0xFFFD, which then were
passed on to the hex/base64 encoders, resulting in incorrect output.

This patch fixes it by expecting `any` as an input type,
which allows the function to correctly read raw bytes of the input data.
2023-05-16 09:44:35 +08:00
..
testdata fix non-ascii characters handling in to_hex and to_base64 functions 2023-05-16 09:44:35 +08:00
encoding.go fix non-ascii characters handling in to_hex and to_base64 functions 2023-05-16 09:44:35 +08:00
encoding.jq interp: Rename to/from<format> functions to to_/from_<format> 2022-12-21 17:48:39 +01:00
url.go interp: Rename to/from<format> functions to to_/from_<format> 2022-12-21 17:48:39 +01:00