Open jjserra68 opened 2 years ago
You did not mention which R version it is, and which OS (Windows, MacOS or Linux) and frontend (R GUI, Rterm, RStudio, R.app, R in Terminal, VSCode, ...) you used. The {svDialogs} package tries hard to use native dialog boxes on each of those combinations. After a series of verifications:
winDialogString()
function under Windows that is used by svDialogs::dlg_input()
. This can be verified with winDialogString("Párrafo:", "")
which produces the same funky characters.
Consequently, this is a bug in base R, not in {svDialogs}, and I suggest you fill a bug report regarding winDialogString()
to the R Core Team. In the meantime, you could use the {svDialogstcltk} package that uses an alternate Tcl/Tk version of the dialog boxes and does not exhibit this bug. Just replace library(svDialogs)
by library(svDialogstcltk)
and use the same code after this... Note that not all dialog boxes are implemented as Tcl/Tk versions yet. At least for dlg_input()
it is a decent workaround under Windows and R 4.2.0/4.2.1.
I am Spanish and I don't know how I can include accented words in the message to display in a dialog box. For example, dlg_input("Párrafo:") produces an unexpected result. I guess it's a problem with the encoding used.
I would appreciate any feedback that would allow me to solve the problem.