You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2002/04/30 03:56:29 UTC

DO NOT REPLY [Bug 8635] New: - FOP replace japanese chars into # on Linux

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8635>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8635

FOP replace japanese chars into # on Linux 

           Summary: FOP replace japanese chars into # on Linux
           Product: Fop
           Version: 0.20.3
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: pdf renderer
        AssignedTo: fop-dev@xml.apache.org
        ReportedBy: dai@mailagency.com


environment:
 Linux + JDK 1.3.1 + fop 0.20.3, 0.20.2

I did:
  First, I copy ttf font file and cocoon sample files into current directrory.

  export LANG=ja
  java org.apache.fop.fonts.apps.TTFReader  RyobiHonMincho-L.ttf
RyobiHonMincho-L.xml
  vi userconfig.xml
  vi hello-page.xml
  vi simple-page2fo.xsl
  java org.apache.fop.apps.Fop -d -c userconfig.xml -xml hello-page.xml -xsl
simple-page2fo.xsl -ps a.ps
  java org.apache.fop.apps.Fop -d -c userconfig.xml -xml hello-page.xml -xsl
simple-page2fo.xsl -pdf a.pdf
  java org.apache.fop.apps.Fop -d -c userconfig.xml -xml hello-page.xml -xsl
simple-page2fo.xsl -txt a.txt


Results:
  a.txt includes japanese characters correctly.
  a.ps, p.pdf don't have japanese chars. they replaced all japanese chars into '#'.
  ex., in a.ps:
==
0 0 RM
F1 36000 F
(#) t
(Hello) t
241621 664004 M
241621 652004 M
==
this (#) should be japanese chars, but fop convert to #.

below is debug info when creatng a.ps:
=====
[DEBUG]: Input mode: 
[DEBUG]: xslt transformation
[DEBUG]: xml input file: hello-page.xml
[DEBUG]: xslt stylesheet: simple-page2fo.xsl
[DEBUG]: Output mode: 
[DEBUG]: PostScript
[DEBUG]: output file: a.ps
[DEBUG]: OPTIONS
[DEBUG]: user configuration file: userconfig.xml
[DEBUG]: debug mode on
[DEBUG]: dump configuration
[DEBUG]: quiet mode on
[DEBUG]: reading user configuration file
[DEBUG]: base directory: file:/home/users/dai/
[INFO]: FOP 0.20.2
[DEBUG]: using SAX parser org.apache.xerces.parsers.SAXParser
[INFO]: building formatting object tree
[DEBUG]: setting up fonts
[DEBUG]: rendering areas to PostScript
[INFO]: [1]
[INFO]: Parsing of document complete, stopping renderer
[DEBUG]: written out PostScript
[DEBUG]: Initial heap size: 647Kb
[DEBUG]: Current heap size: 1521Kb
[DEBUG]: Total memory used: 874Kb
[DEBUG]:   Memory use is indicative; no GC was performed
[DEBUG]:   These figures should not be used comparatively
[DEBUG]: Total time used: 17507ms
[DEBUG]: Pages rendererd: 1
[DEBUG]: Avg render time: 17507ms/page
======

in userconfig.xml, I added:
======
 <font metrics-file="RF_HonMincho-L.xml" kerning="yes"
embed-file="RF_HonMincho-L.ttf">
    <font-triplet name="RyobiHonMincho-L" style="normal" weight="normal"/>
    <font-triplet name="RyobiHonMincho-L" style="normal" weight="bold"/>
    <font-triplet name="RyobiHonMincho-L" style="italic" weight="normal"/>
    <font-triplet name="RyobiHonMincho-L" style="italic" weight="bold"/>
 </font>
======
(this font is bundled font when I bought turbo linux jp distribution.)

in simple-page2fo.xsl, I changed font-family:
===========
        <fo:block text-align="center" 
                  font-size="10pt" 
                  font-family="RyobiHonMincho-L" 
                  line-height="14pt">page <fo:page-number/></fo:block>
===========

I tried change character code of hello-page.xml to utf-8, euc-jp, shift_jis, but
in all caseses, I got fail results.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org