github.com/GuanceCloud/cliutils@v1.1.21/pipeline/ptinput/funcs/md/decode.en.md (about) 1 ### `decode()` {#fn-decode} 2 3 Function prototype: `fn decode(text: str, text_encode: str)` 4 5 Function description: Convert text to UTF8 encoding to deal with the problem that the original log is not UTF8 encoded. Currently supported encodings are utf-16le/utf-16be/gbk/gb18030 (these encoding names can only be lowercase) 6 7 Example: 8 9 ```python 10 decode("wwwwww", "gbk") 11 12 # Extracted data(drop: false, cost: 33.279µs): 13 # { 14 # "message": "wwwwww", 15 # } 16 ```