Skip to content

Sourcing files with Umlaut in path no longer works

5 messages · Ulrike Grömping, Duncan Murdoch, Peter Dalgaard

#
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
#
On 12-11-21 6:49 AM, Ulrike Gr?mping wrote:
Can you change directory, and then source without the Gr?mping in the path?

Duncan Murdoch
#
On Nov 21, 2012, at 12:49 , Ulrike Gr?mping wrote:

            
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).

  
    
#
On 21/11/2012 6:49 AM, Ulrike Gr?mping wrote:
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
#
Duncan and Peter, thank you very much!
Actually, I made a mistake with the path, due to my inexperience with 
Windows 7 (user instead of users). The R warning then confused me, 
because I was told that 'C:/user/gr??mping/documents/publicat/...' 
wasn't found.
In fact, once the path was correct, source worked without problems.
Thus, only the warning message did not properly handle the encoding.

Best regards,
Ulrike Gr?mping

Am 21.11.2012 15:59, schrieb Duncan Murdoch: