> sessionInfo()
R version 2.7.0 Patched (2008-04-24 r45485)
i386-pc-mingw32

locale:
LC_COLLATE=Chinese_People's Republic of China.936;LC_CTYPE=Chinese_People's
Republic of China.936;LC_MONETARY=Chinese_People's Republic of
China.936;LC_NUMERIC=C;LC_TIME=Chinese_People's Republic of China.936

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods
[7] base
>


2008/5/15 ronggui <[EMAIL PROTECTED]>:

> The incorrect result incurs when the file path contains Chinese character.
> It seems that dirname/basename action on unit of byte instead of char, so
> the result in the following example is half of what is expected.
>
> > g<-"d:\\如果含有中文\\如果含有中文.txt"
> > dirname(g)
> [1] "d:/如果含"
> > basename(g)
> [1] "如果含有"
>
>
> --
> HUANG Ronggui, Wincent http://ronggui.huang.googlepages.com/
> Bachelor of Social Work, Fudan University, China
> Master of sociology, Fudan University, China
> Ph.D. Candidate, CityU of HK.




-- 
HUANG Ronggui, Wincent http://ronggui.huang.googlepages.com/
Bachelor of Social Work, Fudan University, China
Master of sociology, Fudan University, China
Ph.D. Candidate, CityU of HK.

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to