You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a windows user, I encountered several times the issue of executing a command with system() and internal = TRUE, then having the surprise of encoding problem. My finding was that string output was not marked with the encoding that the command was using.
Hugo output handling which lead to a xfun::system3() wrapper: yihui/xfun@f8020f1
In all case, a solution was to mark the output with the encoding we expect from the command.
It seems there is no single solution to this problem as it depends on how the command will output, but at least knowing about this helps solves some issues.
Opening this issue for discussion, also if others have experience about this.
The text was updated successfully, but these errors were encountered:
FWIW, processx::run() has an encoding argument, which specifies the encoding of stdout and stderr of the command. (Which processx always re-encodes in UTF-8.)
As a windows user, I encountered several times the issue of executing a command with
system()
andinternal = TRUE
, then having the surprise of encoding problem. My finding was that string output was not marked with the encoding that the command was using.Example:
systeminfo
in CMD on French windows : Error detecting locale - incomplete final line rstudio/rsconnect#233pandoc
outputing as UTF-8 which required: Encoding problems in pandoc_citeproc_convert() with Windows rstudio/rmarkdown#2195xfun::system3()
wrapper: yihui/xfun@f8020f1In all case, a solution was to mark the output with the encoding we expect from the command.
It seems there is no single solution to this problem as it depends on how the command will output, but at least knowing about this helps solves some issues.
Opening this issue for discussion, also if others have experience about this.
The text was updated successfully, but these errors were encountered: