Skip to content

Commit fcc0482

Browse files
committed
Added docs on base64 only working with utf8 content
1 parent 5950329 commit fcc0482

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

pkg/yqlib/doc/operators/encode-decode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ See CSV and TSV [documentation](https://mikefarah.gitbook.io/yq/usage/csv-tsv) f
2525
XML uses the `--xml-attribute-prefix` and `xml-content-name` flags to identify attributes and content fields.
2626

2727

28-
Base64 assumes [rfc4648](https://rfc-editor.org/rfc/rfc4648.html) encoding. Encoding and decoding both assume that the content is a string.
28+
Base64 assumes [rfc4648](https://rfc-editor.org/rfc/rfc4648.html) encoding. Encoding and decoding both assume that the content is a utf-8 string and not binary content.
2929

3030
## Encode value as json string
3131
Given a sample.yml file of:

pkg/yqlib/doc/operators/headers/encode-decode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ See CSV and TSV [documentation](https://mikefarah.gitbook.io/yq/usage/csv-tsv) f
2525
XML uses the `--xml-attribute-prefix` and `xml-content-name` flags to identify attributes and content fields.
2626

2727

28-
Base64 assumes [rfc4648](https://rfc-editor.org/rfc/rfc4648.html) encoding. Encoding and decoding both assume that the content is a string.
28+
Base64 assumes [rfc4648](https://rfc-editor.org/rfc/rfc4648.html) encoding. Encoding and decoding both assume that the content is a utf-8 string and not binary content.

pkg/yqlib/doc/operators/headers/load.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ You can load files of the following supported types:
1414
| Plain String | load_str |
1515
| Base64 | load_base64 |
1616

17+
Note that load_base64 only works for base64 encoded utf-8 strings.
18+
1719
## Samples files for tests:
1820

1921
### yaml

pkg/yqlib/doc/operators/load.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ You can load files of the following supported types:
1414
| Plain String | load_str |
1515
| Base64 | load_base64 |
1616

17+
Note that load_base64 only works for base64 encoded utf-8 strings.
18+
1719
## Samples files for tests:
1820

1921
### yaml

0 commit comments

Comments
 (0)