Skip to content
Prev 29925 / 63462 Next

Problem with UTF-8 text in the Rcmdr package

Dear Brian,

Thank you for addressing the problem -- I was hoping that you would.
Jaro provides an example in one of his messages in my posting (though it is
slightly in error): If one enters 

cat("??????\n") 

in the Rcmdr Script window, the characters are rendered correctly. Executing
this command (via the Submit button) produces the following in the Output
window:
??????

which actually appears as
??

This is under Windows Vista / R 2.7.2 / Rcmdr 1.4-0.
I've now checked under Mac OS X and Linux Ubuntu, with the following
results:

Under Mac OS X 10.5.4 / R 2.7.2 / Rcmdr 1.4-0 / Tcl/Tk 8.4 

cat("??????\n") appears as cat("?????\n") in *both* the Script window and
the Output window.

Under Ubuntu Linux 8.04 / R 2.7.0 / Rcmdr 1.4-0/ Tcl/Tk 8.5

cat("??????\n") appears *correctly* in *both* the Script window and the
Output window.
I'm afraid that I don't know how to check this short of changing the locale
for my Windows machine. I do observe the problem in Windows when I start
Rgui with language=sl.
Yes, and please see above, but if the problem were with Tcl/Tk, why does
this work in the Script window under Windows and in both Script and Output
under Ubuntu?
Yes, the Rcmdr package uses gettext(). Could Jaro avoid the problem by using
Latin-2 in preference to UTF-8?
Indeed, please see above. I've also attached a screenshot under Windows,
having started R with language=sl.
I'm above my depth with respect to these issues, but I do find it curious
that under Windows the characters appears correctly in the Script window but
not the Output window.
I hope that the additional information in this message will supply at least
some of the necessary details.

Thank you for your help,
 John
window.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot.pdf
Type: application/pdf
Size: 58260 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20080907/0f9d413e/attachment.pdf>