phpstudy is garbled because the encoding and decoding methods are inconsistent. The solution: 1. Open the "Control Panel"; 2. Open the "Clock, Language and Region"; 3. Click "Region"; 4. Click the "Management" icon on the small window; 5. Click "Change System Regional Settings", select "Specific Language", and then click "OK"; 6. Restart the computer.
The operating environment of this tutorial: Windows 7 system, PHP version 8.1, Dell G3 computer.
What should I do if phpstudy is garbled?
The garbled characters in phpstudy caused Apache or Nginx to fail to start
When I was using Phpstudy today, I suddenly couldn’t create a new site (I haven’t used it for a long time).
The error message is as follows: (Note that the screenshot location, port and time are all garbled)
After consulting a lot of information , it turns out to be caused by the encoding format of the software. When using other software, you may also encounter similar prompts, such as: galgame ( ╯□╰ )) Strange prompts like this.
The reason for garbled characters is very simple: the encoding and decoding methods are inconsistent! ! ! ! ! ! ! ! ! ! !
First of all, everyone needs to know that Unicode encoding is used in computer memory. There is a conversion process for non-Unicode encoded software:
Convert non-Unicode encoded data into Unicode encoding form, which is a process of decoding (reading non-Unicode encoded data) and encoding (encoding into Unicode form).
You can take a look at how the operating system manages non-Unicode encoded programs.
You can see that in this system, non-Unicode encoded programs are encoded and decoded using Japanese encoding, because I am playing Japanese galgame during this time. , so I changed the system settings.
For example, Chinese operating systems use Chinese encoding by default for non-Unicode encoded programs.
Now everyone understands why Japanese games appear garbled on Chinese Windows systems:
These Japanese games are encoded in Japanese, and the Chinese Windows system is decoding these software When , the Chinese encoding method is used for decoding by default, so garbled characters appear or it cannot run at all.
Specific solution:
1. Open (Control Panel).
2. Open (clock, language and region).
3. Click (area) and a small window will pop up.
4. Click the (Management) icon on the small window.
5. Click (Change system regional settings), select (specific language, such as Japanese), and then click (OK).
6. Restart the computer.
Note: This modification is still very troublesome and requires repeated restarting of the computer. However, there are many software that can change the encoding method. For example, the applocale that comes with the Windows system is very useful, and there are also third-party Locale Emulator... These software are very useful.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What to do if phpstudy is garbled. For more information, please follow other related articles on the PHP Chinese website!