我正在尝试使用 utf-8 编码为要发送到 Google Base 的数据创建自动提要生成。但是,每当发现连字符告诉我相关属性(标题、描述、产品类型)中存在编码错误时,我都会收到错误消息。我目前正在使用:
−
但我也尝试过:
−
两者都没有奏效。我在文档顶部使用以下声明:
<?xml version="1.0" encoding="utf-8"?>
好的,为了进一步说明这一点,数据是从我们网站的产品信息中提取的,该产品信息以 UTF-8 编码数据存储在 MYSQL 数据库中。数据将进入 RSS 2.0 提要,使用一些标准的 RSS 属性以及一些自定义的 Google 属性。每当除了链接字段之外的任何字段中都有连字符时,就会出现问题。所以它出现在标题和描述字段以及自定义产品类型字段中。以下是 Google Base(商家中心)抛出错误的字段示例。无论有没有其他实体,它都会引发相同的错误,并且只有在删除连字符时才会停止反对。
<description><p>Your sports floor is designed primarily for sports use. Thou many facilities have to be used for other activities including things like; assemblies careers fairs drama parties and social events bring and buy sales exhibitions etc.</p>
<p>Solid hardwood sports floors are designated as "area elastic floors" to provide the spring resilience and shock absorbing qualities needed for sports and dance use to minimise injury. If the floor is too hard the athlete and user will be exposed to early fatigue and aching joints through to injury such as sprains joint and shin bone damage.</p>
<p>If too soft then ball bounce and running characteristics are compromised.
In the UK hardwood sports floors are governed by a number of recognised standards</p>
<p>All sports floors must conform to BS7044 Part 4 - this is the minimum Sport England requirement with which your floor msut comply if it is part of a Sport England sponsored project.</p>
<p>A higher more demanding standard for better quality sports and dance flooring is DIN 18032 Part 2</p>
<p>The newest - and the best - standard is the European Standard CEN 217. This standard has brought together all the best eprformance criteria from a number of current standards in the EU including BS and DIN.</p>
<p>All Junckers systems fully comply with one or more of these standards. They ALL comply with the minimum Sport England requirement of BS7044 Part 4 compliance.</p></description>