text recipe encoding



  • Re: Problem with text recipe encoding

    Hi

    we currently only support UTF8 encoding [...]

    Do you have any plans to enable setting of encoding?
    Thank you


  • administrators

    hi! nothing planned immediately, it is in backlog but for now we have other planned feature at the top of the list



  • It turned out this is already possible with current version. You just need to create custom jsreport script and in the afterRender hook encode the result into desired encoding. For example for windows-1252 you can do.

    const iconv = require('iconv-lite');
    function afterRender(req, res) {
      res.content = Buffer.from(iconv.encode(res.content.toString(), 'win1252'), 'binary')
    }
    

Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.