# 显示热力图背景页面出现乱码的情况下

本文档说明显示热力图时背景网页出现乱码的原因及解决方法。

通过执行此步骤，您可以解决热力图上的乱码问题，正确显示网页。这样可以在准确的页面显示基础上分析用户行为。

## 常见使用场景

当显示热力图时背景网页出现乱码时很有帮助。当网站HTML标头中指定的字符编码（例如：`euc-jp`）与浏览器实际显示页面时使用的字符编码（例如：`UTF-8`）不匹配时，就会发生此问题。

## 此功能的设置方法

按照以下步骤确认字符编码不匹配，并修改HTML文件。

### 1. 确认浏览器识别的字符编码

首先，确认浏览器以哪种字符编码识别页面。

在出现乱码的页面中，打开Chrome开发者工具。（`F12`键或`Ctrl+Shift+I`）

打开"控制台（Console）"选项卡。

在控制台中输入`document.characterSet`，然后按Enter键。

确认显示的字符编码（例如：`UTF-8`）。

### 2. 修改HTML标头的字符编码

接下来，修改网站的HTML文件，使其与浏览器识别的字符编码匹配。

打开网站的HTML文件。

查找标头部分中的字符编码指定（`<meta charset="...">`）。

将其更改为在步骤1中确认的字符编码。 （例如：将`<meta charset="euc-jp">`更改为`<meta charset="UTF-8">`）

保存文件，重新加载网站，并确认乱码问题是否已解决。

**【请注意】** 更改字符编码时，请确保站点内的所有文本文件都以相同的字符编码保存。如果混合了不同的字符编码，可能会出现其他问题。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helps.ptengine.com/cn/faq/insight-setting/heatmap-garbled.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
