[OS X TeX] quick question about character encoding in file names in R 3.2
bhh at xs4all.nl
Sun May 3 01:02:38 EDT 2015
Shouldn’t this have been sent to the R-help list?
> On 02-05-2015, at 21:45, Chabot Denis <chabotd at globetrotter.net> wrote:
> 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)
>  fr_CA.UTF-8/fr_CA.UTF-8/fr_CA.UTF-8/C/fr_CA.UTF-8/fr_CA.UTF-8
> attached base packages:
>  stats graphics grDevices utils datasets methods base
> loaded via a namespace (and not attached):
>  tools_3.2.0
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
More information about the MacOSX-TeX