github.com/GuanceCloud/cliutils@v1.1.21/pipeline/ptinput/funcs/md/decode.md (about)

     1  ### `decode()` {#fn-decode}
     2  
     3  函数原型:`fn decode(text: str, text_encode: str)`
     4  
     5  函数说明:把 text 变成 UTF8 编码,以处理原始日志为非 UTF8 编码的问题。目前支持的编码为 utf-16le/utf-16be/gbk/gb18030(这些编码名只能小写)
     6  
     7  ```python
     8  decode("wwwwww", "gbk")
     9  
    10  # Extracted data(drop: false, cost: 33.279µs):
    11  # {
    12  #   "message": "wwwwww",
    13  # }
    14  ```