Emmanuel Charpentier
2008-Aug-12 17:13 UTC
[R] Possible buglet (wart ?) of odfWeave 0.7.6 (with workaround)
Dear List, I have had problems inserting some (not all !) figures via odfWeave (using print(someLatticeFunction)...). The figure was correctly displayed in a R device window but the resulting ODF document displayed the correct space for the figure and an empty frame with a "broken image" icon and a "read error" mention. Exploration of the odf (.odt, in my case) file showed that the relevant files (.eps, which is a vector format much more apt than bitmaps to cutting/pasting on various media) existed in the Pictures directory of the file and displayed fine. Then lightning struck : the picture files were named an follows : "content_", serial number, chunk name, ".eps" ; it occured to me that OpenOffice 2.4.1 (as packaged in Debian) displayed a "Read error" *when the chunk name had accented characters in it* (my system works in UTF8). Plain ASCII chunk names work OK. I do not know ODF specification well enough to be sure that this is an odfWeave problem (some chunk name mangling might be necessary) rather than an OpenOffice "infelicity" (non-implementation of a specification-requested feature) : checking with another ODF-compliant word processor might be useful, but I don't have any on hand. In any case, this problem is not obvious after re-reading the odfWeave documentation, and does not seem to have been already reported to r-help (yes, Pr Ripley, I did my homework...). This report might spare some poor non-English-writer sod some time ... For what it's worth :> sessionInfo()R version 2.7.1 (2008-06-23) x86_64-pc-linux-gnu locale: LC_CTYPE=fr_FR.UTF-8;LC_NUMERIC=C;LC_TIME=fr_FR.UTF-8;LC_COLLATE=fr_FR.UTF-8;LC_MONETARY=C;LC_MESSAGES=fr_FR.UTF-8;LC_PAPER=fr_FR.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=fr_FR.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] odfWeave_0.7.6 XML_1.96-0 lattice_0.17-13 loaded via a namespace (and not attached): [1] grid_2.7.1 tools_2.7.1 Hoping this might help, Emmanuel Charpentier PS : don't try to answer to my subscribed address (charpent (at) bacbuc (dot) dyndns (dot) org), which is the apparent source of this message : bacbuc (dot) dyndns (dot) org is down and will quite like likely remain so for at least two to three more weeks. I'm playing fast and loose with Gmane by putting my registered address as a Reply-to address and use my actual present address (emm (dot) charpentier (at) free (dot) fr) as source. I do not know what will survive Gmane, Mailman and Martin's scripts mauling...
Emmanuel Charpentier
2008-Aug-12 17:19 UTC
[R] Possible buglet (wart ?) of odfWeave 0.7.6 (with workaround)
Dear List, I have had problems inserting some (not all !) figures via odfWeave (using print(someLatticeFunction)...). The figure was correctly displayed in a R device window but the resulting ODF document displayed the correct space for the figure and an empty frame with a "broken image" icon and a "read error" mention. Exploration of the odf (.odt, in my case) file showed that the relevant files (.eps, which is a vector format much more apt than bitmaps to cutting/pasting on various media) existed in the Pictures directory of the file and displayed fine. Then lightning struck : the picture files were named an follows : "content_", serial number, chunk name, ".eps" ; it occured to me that OpenOffice 2.4.1 (as packaged in Debian) displayed a "Read error" *when the chunk name had accented characters in it* (my system works in UTF8). Plain ASCII chunk names work OK. I do not know ODF specification well enough to be sure that this is an odfWeave problem (some chunk name mangling might be necessary) rather than an OpenOffice "infelicity" (non-implementation of a specification-requested feature) : checking with another ODF-compliant word processor might be useful, but I don't have any on hand. In any case, this problem is not obvious after re-reading the odfWeave documentation, and does not seem to have been already reported to r-help (yes, Pr Ripley, I did my homework...). This report might spare some poor non-English-writer sod some time ... For what it's worth :> sessionInfo()R version 2.7.1 (2008-06-23) x86_64-pc-linux-gnu locale: LC_CTYPE=fr_FR.UTF-8;LC_NUMERIC=C;LC_TIME=fr_FR.UTF-8;LC_COLLATE=fr_FR.UTF-8;LC_MONETARY=C;LC_MESSAGES=fr_FR.UTF-8;LC_PAPER=fr_FR.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=fr_FR.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] odfWeave_0.7.6 XML_1.96-0 lattice_0.17-13 loaded via a namespace (and not attached): [1] grid_2.7.1 tools_2.7.1 Hoping this might help, Emmanuel Charpentier PS : don't try to answer to my subscribed address (charpent (at) bacbuc (dot) dyndns (dot) org), which is the apparent source of this message : bacbuc (dot) dyndns (dot) org is down and will quite like likely remain so for at least two to three more weeks. I'm playing fast and loose with Gmane by putting my registered address as a Reply-to address and use my actual present address (emm (dot) charpentier (at) free (dot) fr) as source. I do not know what will survive Gmane, Mailman and Martin's scripts mauling...
Max
2008-Aug-29 01:37 UTC
[R] Possible buglet (wart ?) of odfWeave 0.7.6 (with workaround)
Emmanuel, On 8/12/08 1:13 PM, "Emmanuel Charpentier" <emm.charpentier at free.fr> wrote:> Then lightning struck : the picture files were named an follows : > "content_", serial number, chunk name, ".eps" ; it occured to me that > OpenOffice 2.4.1 (as packaged in Debian) displayed a "Read error" *when > the chunk name had accented characters in it* (my system works in UTF8). > Plain ASCII chunk names work OK.Since we use Sweave directly and that is the naming convention that it uses for image files. Once you open the document in OpenOffice, it sometimes renames the image files that are stored internally (in some versions of OO).> I do not know ODF specification well enough to be sure that this is an > odfWeave problem (some chunk name mangling might be necessary) rather > than an OpenOffice "infelicity" (non-implementation of a > specification-requested feature) : checking with another ODF-compliant > word processor might be useful, but I don't have any on hand.I think that this is an OpenOffice issue. Look at the last code chunk in: demoFile <- system.file( "examples", "testCases.odt", package ="odfWeave") The code chunk is entirely Chinese characters. Apart from the current encoding issues with odfWeave and XML (on Windows only), this code chunk works fine. If I add fig = TRUE and generate a plot, I get the same issue you described (using NeoOffice and OpenOffice). odfWeave can deal with these characters in code and in code chunk names. I agree that it *should* work since XML documents should be fully UTF-8 compatible. I did a quick search of there open bugs, but I didn't see anything. You should document the issue and submit a bug report. Max