Hi there,

I've hit a bump in writing postscript files with special characters in the WinAnsi encoding on a windows machine.

Here's some sample code:

###########################################
postscript(file = "test.eps", encoding="WinAnsi.enc",
width = 3, height = 5.5, onefile = TRUE, horizontal=FALSE, family = "sans",
   title = "testfig", fonts = "sans")

plot(1:5, 1:5, ylab = " \211")

dev.off()

#############################################

If I then try to open the above file in GSview, it doesn't work and I get all sorts of errors.

I initially thought this might be an issue with ghostscript, but then I looked into the .eps file with a text editor, and see this under the encoding:

% begin encoding
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
/parenleft /parenright /asterisk /plus /comma /minus /period /slash

Does this mean there's an issue in R where it's not able to define certain characters from WinAnsi into postscript characters or something? I'm sort of new to all this, so excuse me if my terminology is inaccurate.

If I use pdf() on the above code, I can open a nice .pdf that works nicely. Also, I've successfully generated .eps files without WinAnsi encoding that open happily in GSview.

What looks like a potentially related topic in the archives is here:

http://tolstoy.newcastle.edu.au/R/e2/help/07/05/17184.html

However, I'm not clear on how I might be able to use this info. to help myself.

If anyone can provide any assistance, I would be eternally grateful.

Oh, and I'm using R 2.4.1.

Cheers,

Mike

--
Michael D. Rennie
Ph.D. Candidate
University of Toronto at Mississauga
3359 Missisagua Rd. N. Mississauga, ON L5L 1C6
Ph: 905-828-5452 Fax: 905-828-3792
www.utm.utoronto.ca/~w3rennie

______________________________________________
R-help@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.

Reply via email to