[R] German umlauts in PDF

Christian Schröder christian.schroeder at shredda.de
Mon Mar 29 01:18:16 CEST 2004


Hi all.

I am using R 1.8.1 on MacOS X (RAqua) to plot some graphs for my
diploma thesis. I had some problems getting the german umlauts
(a-dieresis, for example) into the output file using the pdf device
driver. The umlauts appeared as 'white holes' in the final pdf.

After hours of twiddling I found out that by changing the encoding
to WinAnsi, everything worked like a charm.

Just have a look at this:

pdf("winansi.pdf",encoding="WinAnsi")
plotSymbols()
dev.off()

pdf("isolatin1.pdf",encoding="ISOLatin1")
plotSymbols()
dev.off()

and the generated output in
http://www.shredda.de/winansi.pdf
and
http://www.shredda.de/isolatin1.pdf
respectively.

The former shows the character a-dieresis on position 228.
The latter shows just -ahem- nothing. Since iso8859-1 aka
latin 1 ist supposed to have a-dieresis on position 228 (dec),
I don't get the point.

If this is the preferred way to get umlauts into a pdf, it should
be noted somewhere. Otherwise, what did I miss?

Thanks in advance.

Regards,
Christian




More information about the R-help mailing list