html-to-xlsx problem with emojis



  • Do you have to do anything special to get emojis to work when using the html-to-xlsx recipe? It looks right in the JSON, but I get an error when trying to render the spreadsheet? I was able to duplicate the behavior by just going to the "learn" site and modifying the data.json for the basic html2xlsx example to have an emoji which will hopefully help you duplicate the problem:

    Report "basic" render failed.

    Invalid character "�", char code: 55357 in string "Economist😊" at index: 9
    Error: Invalid character "�", char code: 55357 in string "Economist😊" at index: 9
    at Object.assetLegalXMLChar (/app/node_modules/html-to-xlsx/lib/utils.js:180:11)
    at addRow (/app/node_modules/html-to-xlsx/lib/tableToXlsx.js:80:11)
    at /app/node_modules/html-to-xlsx/lib/tableToXlsx.js:45:7
    at /app/packages/jsreport-html-to-xlsx/lib/htmlToXlsxProcess.js:103:17
    at new Promise (<anonymous>)
    at Object.getRows (/app/packages/jsreport-html-to-xlsx/lib/htmlToXlsxProcess.js:97:16)
    at tableToXlsx (/app/node_modules/html-to-xlsx/lib/tableToXlsx.js:44:17)
    at async convert (/app/node_modules/html-to-xlsx/lib/conversion.js:53:20)
    at async scriptHtmlToXlsxProcessing (/app/packages/jsreport-html-to-xlsx/lib/htmlToXlsxProcess.js:55:20)
    at async module.exports (/app/packages/jsreport-html-to-xlsx/lib/recipe.js:131:18)
    at async invokeRender (/app/packages/jsreport-core/lib/worker/render/render.js:97:5)
    at async WorkerReporter._render (/app/packages/jsreport-core/lib/worker/render/render.js:151:7)
    at async /app/packages/jsreport-core/lib/worker/reporter.js:165:19
    at async Domain.<anonymous> (/app/packages/advanced-workers/lib/workerHandler.js:134:19)



  • I appologize for the delay, we will check it out.

    @bjrmatos Please take a look.


  • administrators

    Do you have to do anything special to get emojis to work when using the html-to-xlsx recipe?

    i will take a look, i see it fails because some validation we do about legal xml chars, will need to verify why we do that, probably it has to do with the support of such chars in xlsx generation.

    subscribe here for updates about when this is fixed


Log in to reply
 

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