Re: [Rd] UTF8 letters are imaged incorrectly (PR#8770)

From: <>
Date: Fri 14 Apr 2006 - 12:13:57 GMT

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, wrote:

> Full_Name: Mikhail Bocharov
> Version: 2.2.1
> OS: Linux
> Submission from: (NULL) (
> Cyrillic UTF8 letters are imaged incorrectly
> Sorry, but English is not my native language
> My operating system is Gentoo-linux. Now i want get the gparhics with russian
> title
> for example: plot(1:20, type='l',
> main='&#1059;&#1090;&#1077;&#1095;&#1082;&#1072;')
> instead of russian letters in title i have this - '5'd'V'i'\'Q , but must be
> '&#1091;&#1090;&#1077;&#1095;&#1082;&#1072;'
> my locale:
> $locale
> LANG=ru_RU.UTF-8
> LC_CTYPE="ru_RU.UTF-8"
> LC_TIME="ru_RU.UTF-8"
> LC_PAPER="ru_RU.UTF-8"
> LC_NAME="ru_RU.UTF-8"
> PS '&#1091;&#1090;&#1077;&#1095;&#1082;&#1072;' in english 'leak&#1072;ge'
> ______________________________________________
> mailing list

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
Received on Fri Apr 14 22:42:30 2006

This archive was generated by hypermail 2.1.8 : Fri 14 Apr 2006 - 16:17:09 GMT