Add Encode Converter Pieces

RSS which i want to track using gbk encode, it will show garbled on result, so i hope can add encode converter piece to convert it

Hi @Johnny_Wong Did you consider using the iconv npm package in a Code step to do this?

I assume you want to convert GBK to UTF-8 which should be doable with iconv. You can ask ChatGPT to help you with the code.

Hi, yep, thats what t want do, but if there have piece to do that, its will be very simple

I moved this topic to Discussions to see if there is interest around it. It’s been a while since I needed to convert text encoding so assess how common this is today, so let’s see!

Hi, im trying using iconv-lite, but the result still garbled, i dont know which part im wrong, its my code

export const code = async (inputs) => {
    const iconv = require('iconv-lite');
    var Buffer = require('buffer').Buffer;

    const inputText = inputs.title;
    const buffer = Buffer.from(inputText, 'binary');
    return iconv.decode(buffer, 'gbk');

BTW, i already try change last line gbk to utf8, also garbled
Its my rss try to catch:

Any help? I’m still stuck here.

Hello @Johnny_Wong ,

Any error you are facing in code piece? Can you please share details about it?

No errors are displayed but the result is still garbled.