From jfox at mcmaster.ca  Sat Sep  6 03:03:38 2008
From: jfox at mcmaster.ca (John Fox)
Date: Fri, 5 Sep 2008 21:03:38 -0400
Subject: [Rd] Problem with UTF-8 text in the Rcmdr package
Message-ID: <000801c90fbc$658fc900$30af5b00$@ca>

Dear list members,

I've attached some email correspondence with Jaro Lajovic (with his permission), detailing a problem with the Slovenian translation file for the Rcmdr package. 

In brief, while certain UTF-8 characters used in Slovenian used to appear properly in older versions of R, some characters do not display properly in the Rcmdr menus and output window under R 2.7.x. I've confirmed the problem with the current version of the Rcmdr package (1.4-0) and R 2.7.2 under Windows Vista.

I've checked the R docs and NEWS file for changes to R, but wasn't able to turn up anything that seemed relevant. Frankly, however, my understanding of how various character sets are handled is only partial.

Any help would be appreciated.

John

------------------------------
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox


-----Original Message-----
From: Jaro.Lajovic [mailto:Jaro.Lajovic at mf.uni-lj.si] 
Sent: August-26-08 2:57 AM
To: John Fox
Subject: Re: Slovenian Rcmdr .po and .mo - and a problem

Dear John,

> That seems to imply that there's a change in R rather than in the Rcmdr
> that produced this problem. Do you notice the problem with any other
> packages that use translation or with R itself?

As for other translated R packages, I am afraid I am not aware of any. 
However, a quick test using cat with special characters:
cat "??????\n"
reveals that the string prints OK in the R (2.7.1.) console. The command 
line also shows OK in the Rcmdr Script window, but does not display 
right in the Output window. Special chars also fail in the Messages window.

Input (Script window) thus seems not to be affected, while the menu 
system and output do not work properly.

Thank you very much,
Jaro


> On Mon, 25 Aug 2008 21:54:43 +0200
>  "Jaro.Lajovic" <Jaro.Lajovic at mf.uni-lj.si> wrote:
>> Dear John,
>>
>>> One question though: I assume from your message that the previous
>>> version of the Rcmdr worked OK with R 2.7.1. Is that right?
>> No, the version 1.3-5 (that I still have with R 2.5.1) does not work
>> with R 2.7.1 either. So:
>>
>> Rcmdr 1.3-5 with R 2.5.1: works OK.
>> Rcmdr 1.3-5 with R 2.7.1: does not work properly.
>> Rcmdr 1.4-0 with R 2.7.1: does not work properly.
>>
>> Thank you in advance,
>> Jaro
>>
>>
>>
>>> On Mon, 25 Aug 2008 18:52:32 +0200
>>>  "Jaro.Lajovic" <Jaro.Lajovic at mf.uni-lj.si> wrote:
>>>> Dear John,
>>>>
>>>> Please find attached zipped Slovenian versions of .po (plain text
>> and
>>>> UTF-8 coded text) and .mo files.
>>>>
>>>> However, there seems to be a problem I have not been able to
>> resolve.
>>>> While special characters display properly under R version 2.5.1
>> with
>>>> Rcmdr 1.3-5, they fail to display (= are substituted by black
>> blocks)
>>>> under R version 2.7.1 with the new Rcmdr 1.4-0. By the way: the
>> .mo
>>>> file of the ver. 1.3-5 copied to 1.4-0 also failed to display
>>>> properly.
>>>>
>>>> (An additional detail: three special characters that are used in
>> the
>>>> Slo version are c, s and z with hacek. c with hacek is not
>> affected,
>>>> it is just s and z with hacek that are not displayed OK.)
>>>>
>>>> Your advice will be much appreciated.
>>>>
>>>> With best regards,
>>>> Jaro
> 
> --------------------------------
> John Fox, Professor
> Department of Sociology
> McMaster University
> Hamilton, Ontario, Canada
> http://socserv.mcmaster.ca/jfox/
> 



[Rd] Problem with UTF-8 text in the Rcmdr package
John Fox