On Fri, 30 Jun 2023 11:33:34 +0300
Adrian Dușa <dusa.adr...@unibuc.ro> wrote:

> In a very simple test, I tried creating a text file from the Electron
> app embedded R:
> sink("test.txt")
> cat("\u00e7")
> sink()
> 
> which resulted in:
> 
> <U+00E7>
> 
> I don't quite understand how this works, my best guess is it matters
> less how R interprets these characters, but how they are passed
> through the child process that started R.

Something goes wrong with the locale setting when the R child process
is being launched. For example,

Rscript -e 'cat("\ue7\n")'
# ç

but:
LC_ALL=C Rscript -e 'cat("\ue7\n")'
# <U+00E7>

When preparing \ue7 for output, R decides that it's not representable
in the session encoding. What's the output of sessionInfo() and
l10n_info() in the child process?

-- 
Best regards,
Ivan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to