xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudhir543-...@yahoo.com
Subject Zero width space is displayed as junk character [â€] in PDF
Date Fri, 06 Nov 2009 10:29:05 GMT
I am using fop 0.20.4.. I need to wrap content inside a block so I am adding zero width spaces
(​ ) to the long string.. how ever Instead of breaking at zero width space.. it
displays ​ as a special character (â€) in PDF.. 

Here's my xsl code that adds zero width spaces as required

 
<xsl:template name="hyphenate">
    <xsl:param name="data" />
    <xsl:param name="limit" select="'10'"/>    
    <xsl:choose>
        <xsl:when test="string-length($data) &lt; $limit">
            <xsl:value-of  select="$data"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:variable name="part" select="substring($data, 1, $limit)"/>
            <xsl:variable name="remaining" select="substring($data, $limit+1)"/>
            <xsl:value-of select='concat($part, "&#x200B;")'/>    
            <xsl:call-template name="hyphenate">
                <xsl:with-param name="data" select="$remaining"/>
                <xsl:with-param name="limit" select="$limit"/>
            </xsl:call-template>                            
        </xsl:otherwise>
    </xsl:choose>    
</xsl:template>  
  

Any ideas why is it happening ?

Thanks
SN



Personally I'm always ready to learn, although I do not always like being taught


      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
Mime
View raw message