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

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


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

Please advise.

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
Sys.setlocale(locale = "en_US.UTF-8")
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.