wch / webshot

Take screenshots of web pages from R
http://wch.github.io/webshot/
227 stars 40 forks source link

UTF-8 encoding error #123

Closed TCantellow closed 6 months ago

TCantellow commented 6 months ago

When using webshot to capture a .hmtl table exported by the tab_model function from sjPlot, it inteprets the "x" character used when showing the interaction effect between two variable names as "Ã-".

I have tried specifying the tab_model function to save the .hmtl table using UTF-8 encoding, but the error persists.

I have tested every step of the process of exporting, saving, and capturing these .html tables, and can confirm that the error occurs with the webshot() function.

I am using Windows 10, and have also set RStudio's default encoding as UTF-8. I have also opened the .html file in browsers, and the encoding is correct. The error only occurs when using the webshot() function.

Any help would be greatly appreciated.

wch commented 6 months ago

webshot uses PhantomJS, which is a headless browser that stopped development in 2018. It is likely that the problem is due to the very old and unsupported browser. Please use webshot2, which uses Chromium-based browsers.