[R-pkg-devel] Conversion failure in 'mbcsToSbcs'

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Sun Nov 19 16:25:39 CET 2023


On Sun, 19 Nov 2023 13:53:52 +0000
Package Maintainer <ggenealogypackage using gmail.com> wrote:

> I added the code you suggested to the package vignette:

It won't work without setting my.Swd as the new plot device instead of
pdf():

\SweaveOpts{grdevice=my.Swd,pdf=FALSE}

You have this directive commented out a few lines later, inside a code
block. It should instead be present outside the code block, without a %
before it.

(It's best to link to a copy of the code available for viewing
somewhere. While I was able to fish out a copy of your package from the
CRAN FTP server this time, it is not always possible to do so.)

A less intrusive way to avoid the error is using the following Sweave
directive:

\SweaveOpts{pdf.encoding = ISOLatin2.enc}

(Without changing the plot device or creating a new plot device in a
hidden code block.)

> In both those cases, I didn't see the ERROR of "Conversion failure in
> 'mbcsToSbcs'".

In order to replicate the problem, you need (1) a fairly recent R-devel
(a pre-release version, e.g. [*]) and (2) the environment variable
_R_CHECK_MBCS_CONVERSION_FAILURE_ set. R-hub runs recent R-devel but
doesn't set the environment variable. I don't know for sure, but I
think that you are running a released version of R. I hope that R-core
will make this test part of R CMD check --as-cran, making it possible
to reproduce such failures with just a copy of R-devel, without extra
environment variables.

-- 
Best regards,
Ivan

[*] https://cran.r-project.org/bin/windows/base/rdevel.html

P.S. Could you please switch your mailer to plain text instead of HTML
when sending messages to the list? When you compose your e-mail in
HTML, your mailer automatically prepares a plain text equivalent where
the code block is seriously mangled. This plain text equivalent is what
the list subscribers see:
https://stat.ethz.ch/pipermail/r-package-devel/2023q4/010102.html



More information about the R-package-devel mailing list