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

ripley at stats.ox.ac.uk ripley at stats.ox.ac.uk
Fri Apr 14 14:13:57 CEST 2006


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:

> 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='Утечка')
> instead of russian letters in title i have this - '5'd'V'i'\'Q , but must be
> 'утечка'
>
>
> 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 'утечка' in english 'leakаge'
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,                  ripley at 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



More information about the R-devel mailing list