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

From: <ripley_at_stats.ox.ac.uk>
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, bocharov_m@inbox.ru wrote:

> Full_Name: Mikhail Bocharov
> Version: 2.2.1
> OS: Linux
> Submission from: (NULL) (62.148.130.28)
>
>
> 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_NUMERIC="ru_RU.UTF-8"
> LC_TIME="ru_RU.UTF-8"
> LC_COLLATE="ru_RU.UTF-8"
> LC_MONETARY="ru_RU.UTF-8"
> LC_MESSAGES="ru_RU.UTF-8"
> LC_PAPER="ru_RU.UTF-8"
> LC_NAME="ru_RU.UTF-8"
> LC_ADDRESS="ru_RU.UTF-8"
> LC_TELEPHONE="ru_RU.UTF-8"
> LC_MEASUREMENT="ru_RU.UTF-8"
> LC_IDENTIFICATION="ru_RU.UTF-8"
> LC_ALL=
>
> PS '&#1091;&#1090;&#1077;&#1095;&#1082;&#1072;' in english 'leak&#1072;ge'
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
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