[R-pkg-devel] Inputenc error when submitting package

Sebastian Meyer @eb@meyer @end|ng |rom |@u@de
Tue Aug 9 11:32:07 CEST 2022


Am 09.08.22 um 10:30 schrieb Duncan Murdoch:
> On 08/08/2022 8:58 a.m., Jacob Roved wrote:
>> Dear fellow R-developers,
>> I received an error when submitting my package MHCtools v. 1.4.3 to 
>> CRAN, and I’m simply blank on what to do.
>>
>> Please see: 
>> <https://CRAN.R-project.org/web/checks/check_results_MHCtools.html>
>>
>> It appears to concern the pdf version of the manual, which is 
>> generated by the CRAN servers from the markdown docs in the package 
>> folder ‘man’, which in turn are generated by Roxygen from the R code 
>> files. If I undestand the CRAN package check results correctly, the 
>> problem seems to be some characters, that are not translated by the 
>> package inputenc in the CRAN server:
>>
>>      ! Package inputenc Error: Unicode char â<c2><80><c2><90> (U+2010)
>>      (inputenc) not set up for use with LaTeX.
> 
> U+2010 is the hyphen character.  It looks a lot like the ascii "-" (code 
> 2D), which Unicode calls "hyphen-minus".

In most fonts, "\u2010" is indistinguishable from the ASCII 
"hyphen-minus". LaTeX/inputenc gained support for the Unicode hyphen in 
the March 2016 release (substituting an ASCII hyphen), so you need a 
rather old OS to reproduce the error.

Among CRAN's check systems, r-oldrel-windows seems to be the only one 
using a sufficiently old LaTeX version. FWIW, Debian oldoldstable 
(stretch) is at TeX Live 2016, so supports U+2010.

	Sebastian Meyer

> 
> You can find occurrences of it (and other non-ASCII chars) in your files 
> using the tools::showNonASCIIfile() function, e.g.
> 
>    files <- list.files(recursive = TRUE)
>    for (f in files) tools::showNonASCIIfile(f)
> 
> Duncan Murdoch
> 
>>
>> This was also listed as existing problems for the previous version of 
>> MHCtools (1.4.2), and I’m equally baffled about that, because that 
>> passed CRAN submission without errors on May 23rd this year.
>>
>> I have browsed through all my code files and all the markdown files in 
>> the package folder ‘man’, and I don’t find any odd characters.
>>
>> Interestingly, I don’t get the error when running check_win_devel() or 
>> check_rhub().
>>
>> I hope someone can shed some light on what is going on here.
>>
>> Kind regards,
>> Jacob Roved
>> Postdoc
>> GLOBE Institute
>> University of Copenhagen
>>
>>     [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-package-devel using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list