[OS X TeX] quick question about character encoding in file names in R 3.2
chabotd at globetrotter.net
Sat May 2 15:45:36 EDT 2015
I don’t quite know how to produce a repeatable example for you because the problem I have seems to be caused with folder names on my computer.
Yesterday I was still using R 3.1.2 and this was working.
Today with R3.2 it does not.
Input = "../data/"
juvcodData = paste0(Input, "Données respirométrie SDA morues juv/« ) # the name of this folder contains accented vowels
a = 1:10folder1 = paste0(Input, "Données respirométrie SDA morues juv/")
folder2 = paste0(Input, "Donnees respirometrie SDA morues juv/")
a = 1:10
save(a, file="bé.Rda ») #1
save(a, file=paste(Input, "bé.Rda »)) #2
save(a, file=paste(folder1, "bé.Rda »)) #3
save(a, file=paste(folder1, "be.Rda »)) #4
save(a, file=paste(folder2, "bé.Rda »)) #5
save(a, file=paste(folder2, "be.Rda »)) #6
All files were saved with the name I expected, except for # 3:
bé (Conflit lié au codage Unicode).Rda
with the bracket loosely translating to « Conflict related/caused(?) to Unicode coding »
So if there is an accented vowel somewhere along the path already defined in R, and the name I want to give the file, the file name is so altered. If the is an accent only in one of the two, no problem. As I said, there was no such problem with R 3.1.2.
The problem is probably not due to R itself, as this works:
> paste0(folder1, "bé.Rda")
 "../data/Données respirométrie SDA morues juv/bé.Rda »
But when R sends this to the disk, this string causes a problem.
Thanks for any help or suggestion,
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)
attached base packages:
 stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
More information about the MacOSX-TeX