SERE0014: Illegal HTML character: decimal 154

  • 问题:jmeter,生成报告转化成html,报错SERE0014: Illegal HTML character: decimal 154
  • 原因:

  某些字符,特别是控制字符#x7F-#x9F ,在XML中为 合法,但不在HTML中。当数据模型的实例中出现这种字符 时,这是一个序列化错误 [err:SERE0014]以使用HTML输出方法。串行器必须发出信号 错误。

  当x80-x9f范围内的字符出现在您的输入中时,通常意味着该文件采用Windows-1252编码,但被错误标记为ISO-8859-1。不过,我有点惊讶地发现x9D造成了麻烦,因为这在Windows-1252中是未分配的。

  • 解决办法:

   在jmeter.properties文件中添加这句
  jmeter.save.saveservice.output_format=xml 

参考链接:

https://stackoverrun.com/cn/q/10681751

https://ask.csdn.net/questions/274704

https://www.w3.org/TR/xslt-xquery-serialization/#html-output

7 HTML Output Method

The HTML output method serializes the instance of the data model as HTML.

For example, the following XSL stylesheet generates html output,

<xsl:stylesheet version="2.0" 
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="4.0"/>
<xsl:template match="/">
  <html>
    <xsl:apply-templates/>
  </html>
</xsl:template>
...
</xsl:stylesheet>

In the example, the version attribute of the xsl:output element indicates the version of the HTML Recommendation [HTML] to which the serialized result is to conform.

It is entirely the responsibility of the person or process that creates the instance of the data model to ensure that the instance of the data model conforms to the HTML Recommendation [HTML]. It is not an error if the instance of the data model is invalid HTML. Equally, it is entirely under the control of the person or process that creates the instance of the data model whether the output conforms to HTML. If the result tree is valid HTML, the serializer MUST serialize the result in a way that conforms with the version of HTML specified by the requested HTML version.

原文地址:https://www.cnblogs.com/turningli/p/10339376.html