Skip to content
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

write.bib does not write UTF-8 characters properly #43

Open
dieghernan opened this issue Nov 27, 2021 · 1 comment
Open

write.bib does not write UTF-8 characters properly #43

dieghernan opened this issue Nov 27, 2021 · 1 comment

Comments

@dieghernan
Copy link
Member

Hi,

I have seen this when trying to create a bibtex file for cffr:

library(bibtex)
packageVersion("bibtex")


entry <- bibentry(
  "Article",
  doi = "10.21105/joss.03900",
  url = "https://doi.org/10.21105/joss.03900",
  year = 2021,
  publisher = "The Open Journal",
  volume = 6,
  number = 67,
  pages = 3900,
  author = person("Diego", "Hernangómez"),
  title = "cffr: Generate Citation File Format Metadata for R Packages",
  journal = "Journal of Open Source Software"
)

write.bib(entry)

But the "Rpackages.bib" file is:

@Article{,
  doi = {10.21105/joss.03900},
  url = {https://doi.org/10.21105/joss.03900},
  year = {2021},
  publisher = {The Open Journal},
  volume = {6},
  number = {67},
  pages = {3900},
  author = {Diego Hernang?mez},
  title = {cffr: Generate Citation File Format Metadata for R Packages},
  journal = {Journal of Open Source Software},
}

Note the author key: author = {Diego Hernang?mez},, not propley displayed.

@dieghernan
Copy link
Member Author

This is in fact related with #36 and maybe #20

coatless pushed a commit that referenced this issue Jan 13, 2022
* Upgrade testing suite to testthat 3

* Add testing for previous issues

#45

* Add tests for standard bibtex entries

As defined in BibTEX version 0.99b
https://ctan.javinator9889.com/biblio/bibtex/base/btxdoc.pdf

* Update actions

* Add testing for examples

* Add snapshots for examples read.bib This may fail on some platforms

* Skip on non windows

Possibly a character problem related with
#20 and
#43

* Not test on R 3.4

Some changes in default  parsing (snapshot), but results are still ok

* Add more tests

* Try to increase coverage

* One more tests for do_read_bib

* Fix test for do_read_bib

* Revert actions

* Add devtools for testing

* Add more tests

* Add test for multiline string

* Add non standard field names

* Add myself as author

* Move issues to inst/bib files

* Refactor tests for avoiding cluttering
coatless added a commit that referenced this issue Sep 23, 2022
* Upgrade testing suite to testthat 3

* Add testing for previous issues

#45

* Add tests for standard bibtex entries

As defined in BibTEX version 0.99b
https://ctan.javinator9889.com/biblio/bibtex/base/btxdoc.pdf

* Update actions

* Add testing for examples

* Add snapshots for examples read.bib This may fail on some platforms

* Skip on non windows

Possibly a character problem related with
#20 and
#43

* Not test on R 3.4

Some changes in default  parsing (snapshot), but results are still ok

* Add more tests

* Try to increase coverage

* One more tests for do_read_bib

* Fix test for do_read_bib

* Revert actions

* Add devtools for testing

* Add more tests

* Add test for multiline string

* Add non standard field names

* Add myself as author

* Move issues to inst/bib files

* Refactor tests for avoiding cluttering

* Modify do_read_bib()

Also bump version

* Remove C code :)

* Recreate snapshots on Linux

* Check reverse dependencies

* Add backports

* Deprecate arguments

* Use seq_along

Co-authored-by: James J Balamuta <[email protected]>

* Use seq_along again

Co-authored-by: James J Balamuta <[email protected]>

* Remove completely header and footer

* Document internal functions

* Rename internal params

* Use vapply and new tests

* Rerun revdeps

* Update docs and snapshots

* Update revdep and check action

Some snapshots changes due to changes on toBibTex() on later versions of R, not related with the package

* Fix action and snapshots

Co-authored-by: James J Balamuta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant