使用FOP生成法文PDF文档,无法解析“”特点

发布于 2024-08-03 16:22:44 字数 479 浏览 2 评论 0原文

我在 xml 数据和 xslt 样式表中都使用 iso-8859-15 编码。但是,当我尝试将 XML 文档转换为 FO 文档时,“œ”没有显示,而是显示为“?”下面是我面临的问题的示例。

xml数据如下: Nous sommes sous l'emprise du Divin cœur de Celui que mon fils vénère par-dessus

在 fo 文件中,同一行生成为:

<fo:inline color="#FFFFFF">--------</fo:inline>Nous sommes sous l'emprise du Divin c?ur de Celui que mon fils vénère par-dessus </fo:block>

正如您所看到的,除了“œ”字符之外,所有其他重音都生成得很好。

非常感谢任何帮助。这一问题阻碍了一个项目。

I am using iso-8859-15 encoding both in xml data and in the xslt style sheet. But when I try convert XML doc to FO document 'œ' does'nt show up it shows up as '?' Below is the example of the problem I am facing.

The xml data is as follows:
Nous sommes sous l'emprise du Divin cœur de Celui que mon fils vénère par-dessus

in the fo file the same line is generated as :

<fo:inline color="#FFFFFF">--------</fo:inline>Nous sommes sous l'emprise du Divin c?ur de Celui que mon fils vénère par-dessus </fo:block>

As you see all the other accents are getting generated fine except for the 'œ'character.

Any help is greatly appreciated. This one issue is holding up a project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

早茶月光 2024-08-10 16:22:44

你见过http://xmlgraphics.apache.org/fop/faq.html #pdf-字符?可能是您只是使用了没有该字符的字体。另请参阅 http://xmlgraphics.apache.org/fop/stable/fonts.html< /a> 关于如何配置字体。

但是,鉴于您得到一个“?”如果缺少的字符不是“#”,则可能表明存在编码问题。 Sun JVM 通常用“?”替换不在编码中的字符。即使 ISO 8859-15 应支持您想要使用的字符,您也可能需要考虑切换到 UTF-8。由于我无法访问您的 XML 文件,因此我无法确定它是否有问题。

华泰

Have you seen http://xmlgraphics.apache.org/fop/faq.html#pdf-characters ? It could be that you're simply using a font that doesn't have that character. See also http://xmlgraphics.apache.org/fop/stable/fonts.html on how to configure fonts.

However, given that you get a '?' and not a '#' for the missing character could indicate that there's an encoding problem. Sun JVMs usually replace characters that are not in an encoding by a '?'. You might want to consider switching to UTF-8 even though ISO 8859-15 should support the characters you want to use. Since I don't have access to your XML file here, I can't figure out if there's something wrong with it.

HTH

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文