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 Paco Lora <pa...@4dvirtual.com> on 2005/07/21 17:26:45 UTC

Help with Fop -> FO to PDF, Accent problem

First of all, please, let me know if it is'nt the right list to make 
this question.
I explain my process... Y convert some html files to FO with HTML2FO.
Like that, I generate "FO templates". After that, I replace some text in 
these templates and I use FOP to convert from these FO templates to PDF 
files. Under windows there is no problem and all works fine. But under 
linux (debian woody), accents (á, é, ...), are displayed as "?" (both, 
original accents and these that come from replacement of text).
I've considered some causes with no success. There are many things involved.
Could be a problem on the system Locale in my linux?
A file encoding problem?

Thanks a lot!

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Help with Fop -> FO to PDF, Accent problem

Posted by Paco Lora <pa...@4dvirtual.com>.
Maybe you're right.. the exact process is:
- make a copy of the original fo file (in java, with File.createTempFile)
- read the content of the temp file (in java, normal file read)
- in the obtained string, replace some text items (in java, with 
String.replaceAll)
- write the new (replaced) string into temp file (in java, normal file 
write)
- then, call FOP and say to him that has to generate a pdf
    (in java also:  String[] argv = { file, target };
                         Fop.main(argv);
    )
Looking the code, yes... I think that I work with plain text files... :D
I think that the strange thing is that this works on windows :-O
I will try to rewrite these code lines... thanks a lot!


J.Pietschmann escribió:

>> A file encoding problem?
>
> Most certainly.
> How do you do the "replace some text" step? Using an ordinary editor?
> If so, check the encoding the editor uses for saving.
>
> Load the FO file into a hex editor (e.g. Emacs hexl mode) and check
> the character codes, or use the Unicode description utilities:
>  http://www.cis.upenn.edu/~wjposer/unidesc.html
>
> J. Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Help with Fop -> FO to PDF, Accent problem

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Paco Lora wrote:
> ...I generate "FO templates". After that, I replace some text in 
> these templates and I use FOP to convert from these FO templates to PDF 
> files. Under windows there is no problem and all works fine. But under 
> linux (debian woody), accents (á, é, ...), are displayed as "?" 
...
> A file encoding problem?
Most certainly.
How do you do the "replace some text" step? Using an ordinary editor?
If so, check the encoding the editor uses for saving.

Load the FO file into a hex editor (e.g. Emacs hexl mode) and check
the character codes, or use the Unicode description utilities:
  http://www.cis.upenn.edu/~wjposer/unidesc.html

J. Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org