nushell/crates/nu-command
Rodrigo Friães e211e96d33
Fix nushell#10591: encode returns error with utf-16le and utf-16be encodings (nushell#10591) (#12411)
# Description

This closes (nushell#10591)

The Command encode's help text says that utf-16le and utf-16be encodings
are not supported, however you could still use these encodings and they
didn't work properly, since they returned the bytes UTF-8 encoded:
```bash
"䆺ש" | encode utf-16
Length: 5 (0x5) bytes | printable whitespace ascii_other non_ascii
00000000: e4 86 ba d7 a9 ×××××
 ```
# User-Facing Changes

The Command encode's help text was updated and now when trying to encode with utf-16le and utf-16be returns an error:
![screenshot](https://github.com/nushell/nushell/assets/119532691/c346dc57-8b42-4dfc-93d5-638b0041d89f)

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`
2024-04-06 09:07:55 -05:00
..
src Fix nushell#10591: encode returns error with utf-16le and utf-16be encodings (nushell#10591) (#12411) 2024-04-06 09:07:55 -05:00
tests Range refactor (#12405) 2024-04-06 09:04:56 -05:00
Cargo.toml Bump version to 0.92.2 (#12402) 2024-04-05 10:24:00 -04:00
LICENSE Fix rest of license year ranges (#8727) 2023-04-04 09:03:29 +12:00