Mathieu, I can't reproduce this on ubuntu 14.04:
cat(paste("encoding = ", getOption("encoding"), "\n"))
cat(paste("locale = ", Sys.getlocale(), "\n"))
locale =
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C
# suppressMessages(suppressWarnings(require("RStoolbox", quietly =
# provoque erreurs accent e aigu
require("RStoolbox")
Loading required package: RStoolbox
cat(paste("encoding = ", getOption("encoding"),"\n"))
cat(paste("locale = ", Sys.getlocale(), "\n"))
locale =
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C
second ?> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RStoolbox_0.1.3
loaded via a namespace (and not attached):
[1] Rcpp_0.12.2 raster_2.5-2 magrittr_1.5
splines_3.2.3
[5] MASS_7.3-44 doParallel_1.0.10 munsell_0.4.2
geosphere_1.5-1
[9] colorspace_1.2-6 lattice_0.20-33 foreach_1.4.3
minqa_1.2.4
[13] stringr_1.0.0 car_2.1-0 plyr_1.8.3
tools_3.2.3
[17] parallel_3.2.3 nnet_7.3-11 pbkrtest_0.4-2
caret_6.0-64
[21] grid_3.2.3 gtable_0.1.2 nlme_3.1-123 mgcv_1.8-7
[25] quantreg_5.19 rgeos_0.3-15 MatrixModels_0.4-1
iterators_1.0.8
[29] lme4_1.1-10 Matrix_1.2-3 nloptr_1.0.4
reshape2_1.4.1
[33] ggplot2_2.0.0 codetools_0.2-14 sp_1.2-2
stringi_1.0-1
[37] scales_0.3.0 XML_3.98-1.3 stats4_3.2.3 SparseM_1.7
On 21/01/16 13:58, Mathieu Rajerison wrote:
Hi,
This post is not spatially-oriented but deals with an excellent spatial R
package named RStoobox for remote sensing.
I have a process that prints advancement operations with cat() functions.
Some contain e acute as it is for french administrations.
I noticed I had problems with the writing of e acutes after loading
RStoolbox package. I noticed the same with igraph as well
If I write an R file with the following lines :
cat("first \U00E9")
require("RStoolbox")
cat(" second \U00E9")
It gives
first ?
second ?
If I load another package like raster, the problem doesn't appear.
To see if there was any change relative to encodings, I wrote an R file
with the following lines which gives the system encoding before and
cat("first \U00E9 \n")
cat("--before--\n")
cat(paste("encoding = ", getOption("encoding"), "\n"))
cat(paste("locale = ", Sys.getlocale(), "\n"))
# suppressMessages(suppressWarnings(require("RStoolbox", quietly =
# provoque erreurs accent e aigu
require("RStoolbox")
cat("\n")
cat("--after--\n")
cat(paste("encoding = ", getOption("encoding"),"\n"))
cat(paste("locale = ", Sys.getlocale(), "\n"))
cat(" second \U00E9")
But there isn't any change :
first ?
--before--
encoding = native.enc
locale =
LC_COLLATE=French_France.1252;LC_CTYPE=French_France.1252;LC_MONETARY=
French_France.1252;LC_NUMERIC=C;LC_TIME=French_France.1252
Le chargement a n?cessit? le package : RStoolbox
Message d'avis :
le package 'RStoolbox' a ?t? compil? avec la version R 3.1.3
--after--
encoding = native.enc
locale =
LC_COLLATE=French_France.1252;LC_CTYPE=French_France.1252;LC_MONETARY=
French_France.1252;LC_NUMERIC=C;LC_TIME=French_France.1252
second ?
So, i wonder where does this come from ? And how to deal with it
Thanks in advance for your answers,
Mathieu
[[alternative HTML version deleted]]