-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding issues with citations (Windows only) #103
Comments
I also posted the above message at |
Yeah, encoding issues are tough. Looks like this is coming from |
Hi, Explicitly adding the citation using Thanks, Citations I usedS4Vectors = RefManageR::BibEntry(bibtype = 'manual', key = 'S4Vectors',
author = 'Hervé Pagès and Michael Lawrence and Patrick Aboyoun',
title = "S4Vectors: S4 implementation of vector-like and list-like objects",
year = 2017, doi = '10.18129/B9.bioc.S4Vectors')
GenomeInfoDb = RefManageR::BibEntry(bibtype = 'manual',
key = 'GenomeInfoDb',
author = 'Sonali Arora and Martin Morgan and Marc Carlson and H. Pagès',
title = "GenomeInfoDb: Utilities for manipulating chromosome and other 'seqname' identifiers",
year = 2017, doi = '10.18129/B9.bioc.GenomeInfoDb')
AnnotationDbi = RefManageR::BibEntry(bibtype = 'manual',
key = 'AnnotationDbi',
author = 'Hervé Pagès and Marc Carlson and Seth Falcon and Nianhua Li',
title = 'AnnotationDbi: Annotation Database Interface',
year = 2017, doi = '10.18129/B9.bioc.AnnotationDbi')
SummarizedExperiment = RefManageR::BibEntry(bibtype = 'manual',
key = 'SummarizedExperiment',
author = 'Martin Morgan and Valerie Obenchain and Jim Hester and Hervé Pagès',
title = 'SummarizedExperiment: SummarizedExperiment container',
year = 2017, doi = '10.18129/B9.bioc.SummarizedExperiment') |
Hi,
I've been using knitcitations for a while to handle citations in HTML vignettes. I had been using
knitcitations::read.bibtex()
until I realized that it no longer reads the entries in the order that were given in the bib file**. So I made a change and it all works... except on Windows. I finally updated my R installation in a Windows laptop and saw that the problem is with encoding.This short code reproduces the issue:
I see that
knitcitations::write.bibtex()
uses a "?" in authors in situations like this which is why I didn't notice this issue before. From https://cran.r-project.org/doc/manuals/R-exts.html#The-DESCRIPTION-file I see that 'Encoding' in the DESCRIPTION file is used for the citation and I do see "Encoding: UTF-8" in the S4Vectors DESCRIPTION file.I get this error with GenomeInfoDb, AnnotationDbi, S4Vectors and SummarizedExperiment (details and reproducibility info at https://gist.github.com/anonymous/a8c6374b381dc9c27f55487756cb4e1b) across the different vignettes I maintain. But I don't get it with IRanges, GenomicRanges and other packages where Hervé Pagès is an author (those packages cite the 2013 PLoS paper). For example, the IRanges package has a inst/CITATION file that uses
citEntry( , textVersion = "Pag\\es")
. So, specifying an inst/CITATION file works.I imagine that there is a way to deal with the encoding problem properly but I haven't been able to find it. If you have ideas on how I can fix this please let me know.
Thanks!
Leo
** As you can see below
read.bibtex()
changes the order of the citations, so I can't cite them later using citep().Extra info for GitHub issue
Sys.setlocale(category = "LC_ALL", locale = "English_United States.1252")
from utf8ToInt(x) error in write.bibtex #82 (comment) didn't help.bibliography(style = 'text')
as in "No encoding supplied: defaulting to UTF-8." error #102 still fails.The text was updated successfully, but these errors were encountered: