Spec-Zone.ru › Nushell

decode for strings

Decode bytes into a string.

Signature

> decode {flags} (encoding)

Parameters

  • encoding: The text encoding to use.

Input/output types:

input output
binary string

Examples

Decode the output of an external command

> ^cat myfile.q | decode utf-8

Decode an UTF-16 string into nushell UTF-8 string

> 0x[00 53 00 6F 00 6D 00 65 00 20 00 44 00 61 00 74 00 61] | decode utf-16be
Some Data

Notes

Multiple encodings are supported; here are a few: big5, euc-jp, euc-kr, gbk, iso-8859-1, utf-16, cp1252, latin5

For a more complete list of encodings please refer to the encoding_rs documentation link at https://docs.rs/encoding_rs/latest/encoding_rs/#statics

Subcommands:

name description type
decode base32 Decode a Base32-encoded value. built-in
decode base32hex Encode a base32hex value. built-in
decode base64 Decode a Base64-encoded value. built-in
decode hex Decode a hex-encoded value. built-in

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/decode.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API