Skip to content

UTF8 letters are imaged incorrectly (PR#8770)

1 message · Brian Ripley

#
I am sorry, but why do you think this is a bug in R, when it is your X11 
display (I presume, you did not say this was the x11() device) that is not 
rendering the characters correctly?

We have seen this with UTF-8 locales such as Japanese, and it was an OS 
services problem, in that exactly the same code works correctly on some 
versions of the OS and not others. (Earlier this week I ran the compiled 
code for R 2.1.1 which I know worked correctly on FC3 on a fully updated 
machine, and it no longer renders Japanese chars correctly in UTF-8.  The 
R code is unchanged since it was first compiled, but the xorg RPMs have 
changed and hence the code it links to.)

We have traced the X11 calls, and they are being called with the correct 
UTF-8 character string.  Some UTF-8 locales work and some do not, and R 
does not know any difference between UTF-8 locales.

There's a comment at the top of src/modules/X11/rotated.c that you might 
like to uncomment and see if it helps.  That uses UTF-8-specific X11 calls 
that when this was written (for R 2.1.0) did not work correctly in the 
then XFree distribution.

There is nothing we can do to help unless you or someone else in a Russian 
UTF-8 locale can tell us a solution.  It's currently a mystery, but as no 
else has reported it, it seems that for most people in UTF-8 locales it 
does work.

We are well into the beta-test period for R 2.3.0, so please test that to 
see if the problem persists.  (I suspect it will, but no more work will be 
done on R 2.2.x.)
On Fri, 14 Apr 2006, bocharov_m at inbox.ru wrote: