ZendStudio7: The ultimate solution to Chinese garbled text

Source: Internet
Author: User
In the previous article, I introduced the PHP development tool ZendStudio7 getting started tutorial. when the encoding of the newly created (imported) project is UTF8, for example, Wordpress, we found that when zendstudio is used to open the PHP project file for debugging, variables and other issues may encounter Chinese garbled characters, or when you use zend, the previous article I introduced the PHP development tool Zend Studio7 Getting Started Tutorial, during use, when the encoding of the newly created (imported) project is UTF8, for example, Wordpress, we found that when zend studio is used to open the PHP project file for debugging, variables and other issues may encounter Chinese garbled characters, or when you use zend studio to create a UTF-8 encoded PHP file, when you enable zend studio, Chinese characters become garbled. this is because the default character encoding of zend studio is GBK. how can you solve the zend studio Chinese garbled problem?

For PHP project debugging or opening of a single PHP file using zend studio, Chinese garbled characters occur. the solution is actually the same, but the zend studio portal is different, which is easy to confuse PHP beginners.

  Solution to Chinese garbled characters in a single PHP file

Use zend studio7 to open a UTF-8 encoded php File and click File | Properties. the following page is displayed:


Configure zend studio7 file character encoding to solve Chinese garbled characters


We can see that zend studio's default character encoding is GBK. this is the reason why Chinese characters are garbled only when the file character encoding is inconsistent with the default character encoding of zend studio, we just need to click Other, select UTF-8, OK to restore php file Chinese normal display.

  Troubleshooting of Chinese garbled characters during project debugging

The only difference between the debugging project and the PHP file is that the access path is different. you need to select the corresponding project, right-click Properties or select menu Project | Properties to go to the following interface


Configure zend studio7 project character encoding to solve Chinese garbled characters


You can see that the interface is basically the same as before. you only need to select the encoding that matches the project's character encoding to solve the Chinese garbled text problem.

  Zend studio Chinese garbled solution precautions

When selecting character encoding, when zend studio does not provide the character encoding option you want, you can manually enter the corresponding character encoding in the Other box, but note the case sensitivity, it is best to use uppercase letters, because I found that zend studio7 is not very stable to convert Chinese characters with garbled characters.

So far, the solution and Configuration tutorial for Chinese garbled characters encountered during the use of zend studio is complete.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.