To answer your questions:
Yes, there are unicode pdf files. Fop can generate pdf files for non iso
8859 encodings if you provide fonts that support it. However, the
generated pdf isn't unicode but multibyte indexes to the fonts glyphs. It
will be unicode as soon as the toUnicode CMAP is implemented. To generate
the multibyte text, getBytes("UnicodeBigUnmarked") is used.
I think you could (and should) replace getBytes() with
getBytes("ISO-8859-1") most places, but you have to be careful in the
renderers and should test fop thoroughly doing it.
Tore
On Mon, 23 Jul 2001, Markus Bernhardt wrote:
> Hi !
>
> Darren Munt wrote:
>
> > Forgive me if I show my ignorance of FOP internals, but isn't that going to
> > convert all text read by getBytes into ISO-8859-1. If that's the case, there
> > might be a few complaints from Unicode users (such as myself).
>
> We are using FOP since 0.12 and try now to port our
> stuff to a EBCDIC based system, but I'm quite new to the FOP source code.
>
> As I understand you, you have unicode input files, or ?
> I'm interested at the output.
>
> At the moment
> string.getBytes()
> is used to convert java.lang.Strings to bytes to write them
> over a ByteArrayOutputStream into the pdf file.
> Problem here is, that the default encoding will be used
> by java to convert the internal 2 byte character representation
> to 1 byte output. On almost every system under the sun
> the standard java encoding is ISO-8859-1.
>
> AFAIK getBytes() is NEVER unicode safe.
> AFAI can see there should be NO changes in the behavior
> of FOP on any ASCII based system, because java already
> uses this encoding scheme.
>
> Are there unicode PDF files ?
> Can FOP create unicode PDF files ?
>
>
>
> >
> >
> > -----Original Message-----
> > From: Markus Bernhardt [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, 23 July 2001 6:26
> > To: [EMAIL PROTECTED]
> > Subject: Bug fix for non ASCII environments
> >
> > Hi !
> >
> > Finally we have the actual FOP running under OS/390.
> >
> > We simply replaced all occurencies of
> >
> > string.getBytes()
> >
> > with:
> >
> > try {
> > string.getBytes("ISO-8859-1");
> > } catch (UnsupportedEncodingException) {}
> >
> > Is there any chance this fix could go into the official FOP package.
> > It will took only about 30 minutes to inculde it.
> >
> > - markus
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]