Google Base RSS Feed中的连字符编码(减号)

时间:2010-04-16 14:44:57

标签: utf-8 rss character-encoding google-base

我正在尝试为使用utf-8编码发送到Google Base的数据创建自动Feed生成。 但是,每当发现连字符时,我都会收到错误,告诉我相关属性(title,description,product_type)中存在编码错误。我目前正在使用:

−

但我也尝试过:

−

两者都没有奏效。 我在文档顶部使用以下声明:

<?xml version="1.0" encoding="utf-8"?>

好的是为此提供更多背景信息,数据将从我们网站的产品信息中提取,该信息存储为MYSQL数据库中的utf-8编码数据。数据将使用一些标准RSS属性以及一些自定义的Google属性进入RSS 2.0提要。只要在链接字段之外的任何字段中都有连字符,问题就会出现。因此它出现在标题和说明字段以及自定义product_type字段中。以下是Google Base(商家中心)抛出错误字段的示例。无论有没有其他实体,它都会抛出相同的错误,并且仅在删除连字符时停止对象。

    <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Solid hardwood sports floors are designated as &quot;area elastic floors&quot; 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.&lt;/p&gt;

&lt;p&gt;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&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;A higher more demanding standard for better quality sports and dance flooring is DIN 18032 Part 2&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;</description>

1 个答案:

答案 0 :(得分:0)

您谈到使用连字符,但您尝试插入的字符是数学减号。你用实际的连字符试过吗?而不是HTML实体;只是角色-