How to hanlde special characters in R4.2.1?

with reference to how to handle sepcial characters in R?, I still can not handle latin1 chararters in R.

using R-4.2.1

library(tidyverse)
df <- tibble(economy = c("Afghanistan", "Albania", "C\xf4te d'Ivoire")) %>%  arrange(economy)
view(df)

image

however if use R-4.1.3 and run the same code, i get
image

Please advise.
Thanks

I think you need to adjust your system locale setting in R for the behaviour you wish.
I could switch back and forth (in R4.2.1) with your example
between
Sys.setlocale(locale = "en_US.UTF-8")
and
Sys.setlocale(locale = "en_US")

and see a view that didnt work and a view that did.
p.s. i use usethis package to conveniently edit my r profile, to set such settings so I get continuity between my sessions

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.