Skip to content

Commit

Permalink
Added docs on base64 only working with utf8 content
Browse files Browse the repository at this point in the history
  • Loading branch information
mikefarah committed May 23, 2023
1 parent 5950329 commit fcc0482
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/yqlib/doc/operators/encode-decode.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See CSV and TSV [documentation](https://mikefarah.gitbook.io/yq/usage/csv-tsv) f
XML uses the `--xml-attribute-prefix` and `xml-content-name` flags to identify attributes and content fields.


Base64 assumes [rfc4648](https://rfc-editor.org/rfc/rfc4648.html) encoding. Encoding and decoding both assume that the content is a string.
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.

## Encode value as json string
Given a sample.yml file of:
Expand Down
2 changes: 1 addition & 1 deletion pkg/yqlib/doc/operators/headers/encode-decode.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ See CSV and TSV [documentation](https://mikefarah.gitbook.io/yq/usage/csv-tsv) f
XML uses the `--xml-attribute-prefix` and `xml-content-name` flags to identify attributes and content fields.


Base64 assumes [rfc4648](https://rfc-editor.org/rfc/rfc4648.html) encoding. Encoding and decoding both assume that the content is a string.
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.
2 changes: 2 additions & 0 deletions pkg/yqlib/doc/operators/headers/load.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ You can load files of the following supported types:
| Plain String | load_str |
| Base64 | load_base64 |

Note that load_base64 only works for base64 encoded utf-8 strings.

## Samples files for tests:

### yaml
Expand Down
2 changes: 2 additions & 0 deletions pkg/yqlib/doc/operators/load.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ You can load files of the following supported types:
| Plain String | load_str |
| Base64 | load_base64 |

Note that load_base64 only works for base64 encoded utf-8 strings.

## Samples files for tests:

### yaml
Expand Down

0 comments on commit fcc0482

Please sign in to comment.