Skip to content
Prev 29927 / 63462 Next

Problem with UTF-8 text in the Rcmdr package

Dear John,

 >> - Is this anything to do with translations?  I've not looked at how
 >> translations are done in Rcmdr, but if gettext() is used, the string
 >> passed to R for output is in the native encoding, so 'UTF-8
 >> characters' is incorrect.  It is possible that it is an iconv problem
 >> if the translations are supplied in UTF-8 and not Latin-2.
 >
 > Yes, the Rcmdr package uses gettext(). Could Jaro avoid the problem by
 > using Latin-2 in preference to UTF-8?

As mentioned, I am testing this under Windows XP (R 2.7.1).

Preparing the .mo file with the Latin-2 encoding (or Win-1250, for that 
matter) does not make any difference.

However, with the help of my son I have made a test, documented in the 
attached screenshot. It seems that the output routines expect Latin-2, 
but (as for the translation) get the native encoding.

Best regards,
Jaro



John Fox pravi:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rcmdr_czs_demo.png
Type: image/png
Size: 20628 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20080908/5d4b5341/attachment.png>