Bug 8635 - FOP replace japanese chars into # on Linux
Summary: FOP replace japanese chars into # on Linux
Status: CLOSED INVALID
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.20.3
Hardware: PC Linux
: P3 critical
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-30 01:56 UTC by dai@mailagency.com
Modified: 2012-04-01 13:55 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dai@mailagency.com 2002-04-30 01:56:28 UTC
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.
Comment 1 Oleg Tkachenko 2002-11-19 10:12:59 UTC
Are you sure the font has glyphs for ascii characters? Anyway we should resolve
it somehow. Attach font ttf file here if it's not too big (or alternatively send
it to me privately) and I'll try to figure out what's going on wrong.
Comment 2 Oleg Tkachenko 2002-12-04 17:39:25 UTC
Excuse me, but it's not enough information to resolve the bug without your
assistance. Feel free to reopen the bug.
Comment 3 Glenn Adams 2012-04-01 13:55:10 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs