Home >Backend Development >PHP Tutorial >phped debugger debugging, the solution to display garbled characters when the variable value is Chinese_PHP Tutorial

phped debugger debugging, the solution to display garbled characters when the variable value is Chinese_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:46:141123browse

There is the following php code to be debugged:

In the debug analyzer, the garbled characters are displayed as follows:

After exploring all aspects, we found the solution as follows:

You need to set up the debugger encoding separately. There are global settings and personalized settings for each project,

Generally, for global settings, we set it to utf-8 format, as shown in the figure below:

However, this encoding format must be consistent with the specific project encoding format, otherwise the Chinese value will be garbled.

If your project is in "gbk" encoding format, you need to additionally set the debugger for this project to gbk encoding. The operation is as follows:

1>. Right-click the project --> Select "Properties":

2>.Select the "Debugger" tab and set the encoding format as follows:

Note, if your project encoding is "utf-8", select "utf-8" here, if it is "gbk", then select "gbk".

Start debugging again, and the normal display variable value is in Chinese, as shown in the figure below:

Excerpted from Qian Tuwuliang’s blog

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478611.htmlTechArticle has the following php code to be debugged: In the debugging analyzer, the garbled code is displayed as follows: After groping in all aspects, I found The solution is as follows: You need to set the debugger encoding separately, there is...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn