[R] Running odfWeave on its own examples.odt
Frans Marcelissen
frans.marcelissen at digipsy.nl
Fri Aug 10 17:40:43 CEST 2012
Hi,
I had the same problem unde linux. My friend Albert Jan Roskam knew the
solution: add
Sys.setlocale(category = "LC_ALL", locale = "en_US.UTF-8")
I suppose this also works under windows.
Frans
-----Oorspronkelijk bericht-----
Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
Namens John C Nash
Verzonden: vrijdag 10 augustus 2012 15:16
Aan: Duncan Murdoch
CC: r-help at r-project.org
Onderwerp: Re: [R] Running odfWeave on its own examples.odt
My bad. Should have included sessionInfo(). Here it is for the two virtual
machines -- rebooting is a pain!
Since Duncan found it "worked" for him, I suspect some configuration issue.
I'm happy to off-list until it is resolved. I also see the locales, which
are clearly NOT utf8, so maybe Cygwin let's me change them?
JN
WinXP: Professional, Version 2002, Service Pack 3 > sessionInfo() R version
2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United
States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5]
LC_TIME=English_United States.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] MASS_7.3-18 odfWeave_0.8.1 XML_3.9-4.1 lattice_0.20-6
loaded via a namespace (and not attached):
[1] tools_2.15.1
>
Win7: (Professional, Service Pack 1)
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United
States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5]
LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] odfWeave_0.8.1 XML_3.9-4.1 lattice_0.20-6
loaded via a namespace (and not attached):
[1] grid_2.15.1
On 12-08-10 08:59 AM, Duncan Murdoch wrote:
> On 12-08-10 7:55 AM, John C Nash wrote:
>> I'm trying to see if I can help some Windows users, but in WinXP and
>> Win7 virtual machines and in a Win 7-64 real environment, after
>> extracting the odfWeave examples.odt from the package and putting it
>> in my working directory ("My Documents") where R can see and unpack
>> it, I get "unable to convert 'examples.odt' to the current locale".
>> I've tried some searches about UTF8 on Windows, which gave
>> discouraging answers, and also the Sweave manual suggestions of different
options(), e.g., I tried the suggestions regarding useFancyQuotes but
without success.
>>
>> Things work fine (of course!) in Linux of different flavours, so I
>> suspect this is a general Win issue, and I'm hopeful there is a simple
workaround.
>>
>> The reproducible code is to source("tester.R") from R prompt or else
>>
>> Rscript tester.R
>>
>> where tester.R contains
>>
>> library(odfWeave)
>> test<-odfWeave("examples.odt", "ex1out.odt")
>>
>> and this gives the same message "unable to convert examples.odt in the
current locale".
>>
>> For information, changing the file to "simple.odt" does work, at
>> least on one of my systems.
>
> I just tried that in WinXP 32 bit, and it ran without problem. This
> was in R-patched, with odfWeave 0.8.1.
>
> Which versions were you using?
>
> Duncan Murdoch
>
>>
>> John Nash
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list