You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "news@akula.ch" <ne...@akula.ch> on 2004/04/08 12:06:30 UTC
Greek symbols are not correctly displayed
Hi all
I've the problem, that greek symbols are not correctly displayed when i
embedd fop into my application. The character "Omega" looks like "Ω"
instead the normal Omega-symbol. I use the arial-font.
The currious thing is, that when i start fop from the commandline with the
same input file and my userconfiguration-xml it works perfect.
can somebody help me ?
greetz ben
this is my code:
//Construct driver
Driver driver = new Driver();
Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO);
driver.setLogger(logger);
MessageHandler.setScreenLogger(logger);
try {
FileOutputStream fo = new FileOutputStream("test.fo");
fo.write(foXML.getBytes());
fo.close();
//Setup Renderer (output format)
File userConfigFile = new File("userconfig.xml");
Options options = new Options(userConfigFile);
PDFRenderer pdf = new PDFRenderer();
driver.setRenderer(pdf);
File tmp = File.createTempFile("report", ".pdf");
OutputStream out =
new java.io.FileOutputStream(tmp.getAbsolutePath());
try {
driver.setOutputStream(out);
//Setup input
try {
driver.setInputSource(new InputSource(
new StringReader(foXML)));
//Process FO
driver.run();
} catch(java.lang.Exception x) {
x.printStackTrace();
} finally {
}
} catch(java.lang.Exception x) {
x.printStackTrace();
} finally {
out.close();
}
return tmp;
} catch(java.lang.Exception x) {
x.printStackTrace();
}
--
This Workstation is powered by Debian GNU Linux
Use the source !!
My public key: http://www.akula.ch/pubkey.html
Re: Greek symbols are not correctly displayed
Posted by "J.Pietschmann" <j3...@yahoo.de>.
news@akula.ch wrote:
> I've the problem, that greek symbols are not correctly displayed when i
> embedd fop into my application. The character "Omega" looks like "Ω"
> instead the normal Omega-symbol. I use the arial-font.
A typical encoding problem. The XML source or the intermediate FO
(you don't have to use an intermediate string BTW, check the FOP
web site) are encoded as UTF-8 be read as 8859-1 or a similar
encoding. I'm not quite sure why this happens, the relevant parts
of the code are missing.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org