xml - 编码问题,UTF8
问题描述
无法表示双波浪号,即U+0360;
我有一个巨大的 .xml 文件,其中包含用 UTF8 编写的文本。文本里面有很多双波浪线。UTF8 图表中的双波浪号由◌͠◌表示。在 Oxygen 中,一切正常,我可以看到带有双波浪号的字符,使用 DejaVu Sans。问题始于转换场景。我将输出的编码声明为 UTF-8,.xml 文件本身就是 UTF-8,
但尽管如此,转换场景以下列方式返回文本ⴉ͠x - 即第一个字母被块替换。我尝试了在文本中表示双波浪号的不同选项,即我尝试在 .xml 中将其替换为 ͠ ( ͠
) 或Ũ ( ) Ũ
,但结果相同,即块 ⴉ͠x。
.xml 文件中的 unicode 声明:
---
<?xml version="1.0" encoding="UTF-8"?>
---
.xsl 文件中的 unicode 声明:
---
<xsl:output method="html" encoding="UTF-8"/>
---
预期结果是字母 + 波浪号 + 字母。
xslt 文件以以下内容开头:
It starts with the following:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:teidocx="http://www.tei-c.org/ns/teidocx/1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:rng="http://relaxng.org/ns/structure/1.0"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns:teix="http://www.tei-c.org/ns/Examples"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="#all" version="2.0">
<xsl:import href="../common/common.xsl"/>
<xsl:import href="../common/verbatim.xsl"/>
<xsl:import href="html_param.xsl"/>
解决方案
推荐阅读
- php - laravel cron 工作不工作
- amadeus - 航班低价搜索 API 未按 maxPrice 正确过滤
- python - 如何在 django 中存储一组用户?
- linux - “查找”包含指定范围内的整数的文件(在 bash 中)
- video-streaming - 将 rgb 图像与深度信息一起流式传输
- javascript - 如何从网络应用程序访问设备(手机和电脑)相机?
- php - Zend 框架 CSV 下载
- python - 如何在文本框上方放置 django char 字段的标签/描述
- c# - 支持在 .NET Core Web API 中上传图片文件
- regex - 正则表达式匹配 (1|2) 但不包含 (3|4)