Skip to content

encoding is deprecated; all files now assumed to be UTF-8 #754

@vincentvanhees

Description

@vincentvanhees

I am trying to address:

Warning message:
"encoding is deprecated; all files now assumed to be UTF-8"

as produced by testthat functions test-directory and source for package GGIR.

I only get this warning message when testing the package as a whole, and not when running the individual tests with test_file().

What did NOT help was:

  • Adding options(encoding = "UTF-8") to the top of each test file one line below library(mypackagename).
  • Adding options(encoding = "UTF-8") to testthat.R one line below library(mypackagename).
  • Adding argument fileEncoding="UTF-8" to all my calls to write.table.

Could it be that the warning message is printed regardless of whether I use UTF-8 encoding or not and that I am trying to fix an issue that does not really exist? If yes, should the warning message then be a note rather than an warning? If not, could you advise me on what might cause this warning message and how to address it?

thanks, Vincent (and thanks for the great package!)

My sessionInfo():

R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS
Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so
locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=nl_NL.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=nl_NL.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=nl_NL.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=nl_NL.UTF-8 LC_IDENTIFICATION=C       
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] testthat_2.0.0 GGIR_1.5-22   
loaded via a namespace (and not attached):
[1] compiler_3.4.4      magrittr_1.5        R6_2.2.2            tools_3.4.4         yaml_2.1.18         Rcpp_0.12.16       
[7] data.table_1.10.4-3 rlang_0.2.0        

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions