From richierocks at gmail.com  Tue May 26 09:01:00 2015
From: richierocks at gmail.com (Richard Cotton)
Date: Tue, 26 May 2015 10:01:00 +0300
Subject: [Rd] Unicode display problem with data frames under Windows
In-Reply-To: <55635134.4070407@gmail.com>
References: <CAPp_+=fxGdbPvQ7cdS8uopK5kRmcVydO0DVAfN4hPF56Rpeirg@mail.gmail.com>
	<CA+vqiLHCD26qXDpmiwEWGQ6EQBu-zMsWb6hUeJzWtSp-veQFww@mail.gmail.com>
	<55635134.4070407@gmail.com>
Message-ID: <CAPp_+=erhTeV56Sg=ycZpT9oKXT9h6+7UJ6AyaSxD7iceNJShA@mail.gmail.com>

On 25 May 2015 at 19:43, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>> http://stackoverflow.com/questions/17715956/why-do-some-unicode-characters-display-in-matrices-but-not-data-frames-in-r

> Yes, but it is a bug, just a hard one to fix.  It needs someone to dedicate
> a serious amount of time to deal with it.
>
> Since most of the people who tend to do that generally use systems in UTF-8
> locales where this isn't a problem, or don't use Windows, it is languishing.

Thanks for the link and the explanation of why the bug exists.

>> On May 25, 2015 9:39 AM, "Richard Cotton" <richierocks at gmail.com> wrote:
>>
>> > Here's a data frame with some Unicode symbols (set intersection and
>> > union).
>> >
>> > d <- data.frame(x = "A \u222a B \u2229 C")
>> >
>> > Printing this data frame under R 3.2.0 patched (r68378) and Windows 7, I
>> > see
>> >
>> > d
>> > ##                  x
>> > ## 1 A <U+222A> B n C

For future readers searching for a solution to this, you can get
correct printing by setting the CTYPE part of the locale to
Chinese/Japanese/Korean.

Sys.setlocale("LC_CTYPE", "Chinese")
## [1] "Chinese (Simplified)_People's Republic of China.936"

d
##            x
## 1 A ? B ? C

-- 
Regards,
Richie

Learning R
4dpiecharts.com



[Rd] Unicode display problem with data frames under Windows
Richard Cotton