Ulrike Grömping
2012-Nov-21 11:49 UTC
[R] Sourcing files with Umlaut in path no longer works
Dear helpeRs, on my new machine - Windows 7 64Bit, R 2.15-2, I can no longer source files for which the path contains the o-Umlaut (?). As a historical burden, my username is Gr?mping and contains that Umlaut (I wouldn't have chosen it now, but decided to keep it for easy transfer). I have had the difficulty that I couldn't use the R CMD tools on files with Umlauts in the path (and solved it by having a dedicated directory without umlaut in the path for that purpose), but so far (Windows XP and earlier R versions) sourcing from within R worked fine. The issue is that the o-Umlaut (?) is always replaced by a capital A with tilde above together with a paragraph symbol (??). Apparently, the c3b6 used for the o-Umlaut in some encoding is translated back to the ??. Can I somehow fix this? Or is it a bug? Best regards, Ulrike
Duncan Murdoch
2012-Nov-21 12:39 UTC
[R] Sourcing files with Umlaut in path no longer works
On 12-11-21 6:49 AM, Ulrike Gr?mping wrote:> Dear helpeRs, > > on my new machine - Windows 7 64Bit, R 2.15-2, I can no longer source > files for which the path contains the o-Umlaut (?). As a historical > burden, my username is Gr?mping and contains that Umlaut (I wouldn't > have chosen it now, but decided to keep it for easy transfer). I have > had the difficulty that I couldn't use the R CMD tools on files with > Umlauts in the path (and solved it by having a dedicated directory > without umlaut in the path for that purpose), but so far (Windows XP and > earlier R versions) sourcing from within R worked fine. > > The issue is that the o-Umlaut (?) is always replaced by a capital A > with tilde above together with a paragraph symbol (??). Apparently, the > c3b6 used for the o-Umlaut in some encoding is translated back to the > ??. Can I somehow fix this? Or is it a bug?Can you change directory, and then source without the Gr?mping in the path? Duncan Murdoch
peter dalgaard
2012-Nov-21 14:39 UTC
[R] Sourcing files with Umlaut in path no longer works
On Nov 21, 2012, at 12:49 , Ulrike Gr?mping wrote:> Dear helpeRs, > > on my new machine - Windows 7 64Bit, R 2.15-2, I can no longer source files for which the path contains the o-Umlaut (?). As a historical burden, my username is Gr?mping and contains that Umlaut (I wouldn't have chosen it now, but decided to keep it for easy transfer). I have had the difficulty that I couldn't use the R CMD tools on files with Umlauts in the path (and solved it by having a dedicated directory without umlaut in the path for that purpose), but so far (Windows XP and earlier R versions) sourcing from within R worked fine. > > The issue is that the o-Umlaut (?) is always replaced by a capital A with tilde above together with a paragraph symbol (??). Apparently, the c3b6 used for the o-Umlaut in some encoding is translated back to the ??. Can I somehow fix this? Or is it a bug?Without a reproducible example, it is hard to tell where things are going wrong, but the symptoms are those of utf-8 codes being sent to something that expects latin1 (or one of the "8th bit ASCII" variations, anyway).> > Best regards, > Ulrike > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
Duncan Murdoch
2012-Nov-21 14:59 UTC
[R] Sourcing files with Umlaut in path no longer works
On 21/11/2012 6:49 AM, Ulrike Gr?mping wrote:> Dear helpeRs, > > on my new machine - Windows 7 64Bit, R 2.15-2, I can no longer source > files for which the path contains the o-Umlaut (?). As a historical > burden, my username is Gr?mping and contains that Umlaut (I wouldn't > have chosen it now, but decided to keep it for easy transfer). I have > had the difficulty that I couldn't use the R CMD tools on files with > Umlauts in the path (and solved it by having a dedicated directory > without umlaut in the path for that purpose), but so far (Windows XP and > earlier R versions) sourcing from within R worked fine. > > The issue is that the o-Umlaut (?) is always replaced by a capital A > with tilde above together with a paragraph symbol (??). Apparently, the > c3b6 used for the o-Umlaut in some encoding is translated back to the > ??. Can I somehow fix this? Or is it a bug? >I can't reproduce this. The file d:/temp/Gr?mping/test.R contains cat("it worked!\n") I am on Windows 7 64bit, and I see the following in both 32 and 64 bit R: > source("d:/temp/Gr?mping/test.R") it worked! If I look at Encoding("d:/temp/Gr?mping/test.R") I get "latin1". If I run iconv("d:/temp/Gr?mping/test.R", "latin1", "UTF-8") I get a proper UTF-8 string, but if I run iconv("d:/temp/Gr?mping/test.R", "latin1", "utf8") I get a string with encoding marked as "unknown", and displayed as [1] "d:/temp/Gr??mping/test.R" So perhaps you or we have used an unofficial name of the UTF-8 encoding in some conversion. We need to know exactly what you did to pursue this. Duncan Murdoch Duncan Murdoch