[R] Icelandic Characters in Mac
David Winsemius
dwinsemius at comcast.net
Fri Apr 4 03:20:29 CEST 2014
On Apr 3, 2014, at 12:24 PM, peter dalgaard wrote:
>
> On 03 Apr 2014, at 00:59 , David Winsemius <dwinsemius at comcast.net> wrote:
>
>>
>> On Apr 2, 2014, at 2:18 PM, Stefán Hrafn Jónsson wrote:
>>
>>> Dear R community
>>>
>>> I have few students that use Mac. When creating graphs they inform me that
>>> when they use Icelandic characters in title or xlab they get some wrong
>>> results. In stead of
>>>
>>> "fia› er sætt" they get ".a. er s.tt" period in stead of the Icelandic
>>> character.
>>>
>>> Any Icelandic Mac user that has a solution to this? .
>>>
>>>
>>> The Icelandic characters follows.
>>>
>>> Æ æ ó Ó ‹ ›,í Í á Á é É ‡ †
>>>
>>> http://en.wikipedia.org/wiki/Icelandic_alphabet
>>
>> The default screen device is named quartz(). I'm not an Icelander, but in a US locale with the standard fonts I get faithful reproduction of those characters on a Mac running 10.7.5 with R 3.0.2
>>
>
> Rather amusingly, some of the Icelandic got mangled in your mail, though.
> I think I received them correctly in Stefán's mail:
>
> Æ æ ó Ó Ð ð,í Í á Á é É ý Ý
>
> (although thorn þÞ seems missing from the list?)
>
I'm admittedly not an Icelander, nor has my country ever claimed that island, so who knows if what I am seeing with your encoding (and I think you also use a Mac?) and the behavior of my mail-client (using Monaco for display) on this Mac is any more correct today. I also get what appears to be "faithful" transferal (in the sense of the mail version having sufficient similarity to the screen plot) of that set of characters in the title of a plot (attached):
png(); plot(1,1, main="Æ æ ó Ó Ð ð,í Í á Á é É ý Ý" );dev.off()
Maybe Stefán and his students can get further amusement and education with this exchange?
> I too can use "Það er sætt" in plot labels, on 10.9.2 in en_US.UTF-8 locale.
>
> I think we need more info about what setup the students have been using.
I think that's what I said. If they want to see their locale settings, they can execute:
sessionInfo()
# or
Sys.getlocale()
#[1] "en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"
And the help page for that function has this warning:
"Attempts to change the character set (by Sys.setlocale("LC_TYPE", ), if that implies a different character set) during a session may not work and are likely to lead to some confusion."
> Having the locale set to "C" might cause something like the described effect.
You are probably in a better position to tell them how to change the settings.
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
>
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list