Skip to content

possible bug in "R Editor"

2 messages · ronggui, Brian Ripley

#
Dear all,

I clicked "File-New Script" to open a R Editor, typed some commands in
it and then saved it to a file. If the location where I tried to save
the script contained Chinese Character, R Editor complained,

Error: invalid input 'E:\Some.Chinese.Characters\new_file.R' in 'utf8towcs'
R version 2.15.0 (2012-03-30)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936
[2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936
[3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_People's Republic of China.936

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

loaded via a namespace (and not attached):
[1] tools_2.15.0
#
On 31/05/2012 07:04, Wincent wrote:
It is not a bug in the editor. It may be a bug in iconv or other parts 
of the handling of wide characters in the save routine.  I can see how 
the code can be simplified, but we really need to be able to reproduce 
this, and surely that was not the real example.  (One of the problems is 
that the editor title has to be in the native encoding, so this has to 
be done in a Chinese version of Windows.)