wxHtmlEasyPrinting, Postscript and Encoding

David Solbach d at vidsolbach.de
Mon Mar 3 13:08:58 PST 2008


Hi Julian,

Thanks a lot, your answer saved us :)

Actually the complete solution was to install the packet libgnomeprintui2.2-0 
on Kubuntu and everything worked fine.

Again, thank you!

David

Am Montag 03 März 2008 09:39:07 schrieb Julian Smart:
> Hi,
>
> Just a thought - did you configure with --with-gnomeprint? Otherwise,
> it'll default to the generic PostScript code which AFAIK isn't
> Unicode-aware. You also need to check your config.log to make sure that
> the appropriate libgnomeprintui library was found, otherwise it'll be
> disabled even if you specified --with-gnomeprint. You may need to
> download and install libgnomeprintui.
>
> Regards,
>
> Julian
>
> David Solbach wrote:
> > Hi there,
> >
> > I'm pretty desperate with an encoding problem here.
> >
> > I try to print an html file using the wxHtmlEasyPrinting class. The print
> > preview looks fine and all german umlauts and the euro sign  look nice.
> >
> > However, if I print the postscript to a file or a printer, the umlauts
> > and special characters get screwed up (ä becomes ä, which seems to be
> > the case if UTF-8 is interpreted as ISO-8859-1).
> >
> > My test-html looks like this (encoded on disk in UTF-8):
> > ---
> > <html>
> >   <head>
> >     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
> >   </head>
> >   an ae (html notation): &auml;<br>
> >   an ue (html notation): &uuml;<br>
> >   an euro sign (htmlnotation): &euro;<br>
> >   an ae: ä<br>
> >   an ue: ü<br>
> >   an euro sign: €<br>
> > </html>
> > ---
> >
> > I read this file from Disk to a wxString using wxTextFile and then print
> > it with wxHtmlEasyPrinting::PreviewText(). The resulting is attached.
> >
> > (as you can see, the ä is written as \303\244 which looks like UTF-8 in
> > its octal representation, but the postscript file itself states, that
> > it's in "/ISOLatin1Encoding" encoding?)
> >
> > My Platform is linux (Kubuntu 7.10) and I use wxWidgets in version 2.8.
> > The system's standard encoding should be UTF-8. And I use the
> > -DwxUSE_UNICODE define.
> >
> > Here is the complete compiler command line:






More information about the wx-users mailing list