Added docs on base64 only working with utf8 content

This commit is contained in:
Mike Farah 2023-05-23 15:38:08 +10:00
parent 5950329e2c
commit fcc04823ca
4 changed files with 6 additions and 2 deletions

View File

@ -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:

View File

@ -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.

View File

@ -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

View File

@ -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