ComfyUI Node
encode
Converts a string to bytes using the specified encoding. This node encodes text using different character encodings like UTF-8 (default), ASCII, or others. It's useful for preparing text for file saving or network transmission in specific formats.
encode
- STRING
◄string►
◄encoding▾►
◄errors▾►
CategoryBasic/STRING
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | — | |
| encoding | COMBO | 6 options: utf-8, ascii, latin-1, utf-16, utf-32, cp1252 | |
| errors | COMBO | 5 options: strict, ignore, replace, xmlcharrefreplace, backslashreplace |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |