rstudio / rsconnect

Publish Shiny Applications, RMarkdown Documents, Jupyter Notebooks, Plumber APIs, and more
http://rstudio.github.io/rsconnect/
131 stars 79 forks source link

Ensure manifest data is encoded as UTF-8 #974

Closed mslynch closed 10 months ago

mslynch commented 11 months ago

shinyapps.io and Posit Cloud presume manifest.json to be valid JSON encoded in UTF-8. However, some of the data in this file comes from DESCRIPTION files, which may not be encoded in UTF-8. If we see that DESCRIPTION's Encoding field is not UTF-8, we should attempt to convert it.

hadley commented 11 months ago

I think it's very rare for the Encoding to be non-UTF-8.

mslynch commented 11 months ago

I think it's very rare for the Encoding to be non-UTF-8.

That's my impression as well – and it should be ever rarer still for DESCRIPTION to also contain characters that are only valid in latin-1. But we had a customer try to use a package like this (relaimpo).

hadley commented 11 months ago

And particularly annoying in that case is that the only field that is non-ASCII is Packaged, which is definitely not very important.

tyatposit commented 10 months ago

verified. worked fine for me install/call relaimpo and deploy to both cloud and shinyapps which sounds like was a package with a DESCRIPTION encoded as UTF-8.