[R] list.files() not compatible with all Unicode characters; file.exists() is compatible.

MacQueen, Don macqueen1 at llnl.gov
Tue Nov 25 02:25:32 CET 2014


Sorry, your email was undecipherable because you sent HTML formatted email.
Please send plain text

-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062





On 11/24/14, 11:07 AM, "Nissim Kaufmann" <nissimkaufmann at yahoo.com> wrote:

>Hello,I have some files with strange Unicode characters in their names
>that I am trying to remove.But list.files() does not return their names
>faithfully so that I can deal with them.
>> list.files()[1] "? text.txt"                  <--- here you should see
>>a question mark, a space, then text.txt> file.exists("? text.txt")
>><----by copying and pasting the output from above[1] FALSE>
>>file.exists('▶ text.txt')    <--- here you should see a black triangle,
>>what looks like a space, and text.txt[1] TRUE
>Documentation for file.exists() and file.access() do not seem to discuss
>this.
>The file name has these Unicode characters:BLACK RIGHT-POINTING TRIANGLE
>WITH DOUBLE VERTICAL BAR U+23EF BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE
>VERTICAL BAR ⏯BLACK RIGHT-POINTING TRIANGLE U+25B6 BLACK RIGHT-POINTING
>TRIANGLE ▶
>Thank you!CheersNissim KaufmannNSOL.altervista.org
>	[[alternative HTML version deleted]]
>
>______________________________________________
>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.



More information about the R-help mailing list