From c@@rd|@g@bor @end|ng |rom gm@||@com  Fri Apr  9 22:03:46 2021
From: c@@rd|@g@bor @end|ng |rom gm@||@com (=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=)
Date: Fri, 9 Apr 2021 22:03:46 +0200
Subject: [Rd] encodeString converts to UTF-8 on Windows R-devel
In-Reply-To: <CABtg=KkwGA+V81-Z+1LBi69N7cYoRmpbmY4OWYunWh9GM98MOg@mail.gmail.com>
References: <CABtg=KkwGA+V81-Z+1LBi69N7cYoRmpbmY4OWYunWh9GM98MOg@mail.gmail.com>
Message-ID: <CABtg=K=8O7D91KUq1K9r_bGsok6qeXDKXjiwjxitjrkhYFsjjQ@mail.gmail.com>

For the record, this was a bug introduced here:
https://github.com/wch/r-source/commit/1c149eddee9c6d4b87a987a964a611bf8fe43a74
and fixed today here:
https://github.com/wch/r-source/commit/ec0761e63598d38eb5e8ab3fb995da06ab5c91ee

G.

On Fri, Mar 5, 2021 at 2:52 PM G?bor Cs?rdi <csardi.gabor at gmail.com> wrote:
>
> 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



[Rd] encodeString converts to UTF-8 on Windows R-devel
=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=