[Rd] encodeString converts to UTF-8 on Windows R-devel

Gábor Csárdi c@@rd|@g@bor @end|ng |rom gm@||@com
Fri Mar 5 14:52:51 CET 2021


Which is not necessarily bad news. :)

I wonder if this was intended, because I did not find anything about
it in the news file. It also breaks a couple of R packages, e.g. desc,
probably more.

Is this intended?

Thanks!

This is R-devel from yesterday:

> x <- "\xfc"
> Encoding(x) <- "latin1"
> charToRaw(encodeString(x))
[1] c3 bc
>
> l10n_info()
$MBCS
[1] FALSE

$`UTF-8`
[1] FALSE

$`Latin-1`
[1] TRUE

$codepage
[1] 1252

$system.codepage
[1] 1252

and this is R-4.0.4:

> x <- "\xfc"
> Encoding(x) <- "latin1"
> charToRaw(encodeString(x))
[1] fc
>
> l10n_info()
$MBCS
[1] FALSE

$`UTF-8`
[1] FALSE

$`Latin-1`
[1] TRUE

$codepage
[1] 1252

$system.codepage
[1] 1252



More information about the R-devel mailing list