Home >Common Problem >windows7 set utf8 encoding
The method for setting utf8 encoding in windows7 is as follows:
1. Set utf8 encoding in cmd.reg file
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe] "CodePage"=dword:0000fde9 "FontFamily"=dword:00000036 "FontWeight"=dword:00000190 "FaceName"="Consolas" "ScreenBufferSize"=dword:232900d2 "WindowSize"=dword:002b00d2
2. Use it in cmd The chcp 65001 command sets the encoding format to UTF-8.
After CMD, the command line sometimes cannot display Chinese characters, which are garbled characters, so I right-clicked and checked the encoding. It was GBK encoding. How to change to UTF-8
If you want to change to UTF-8, you need to run the chcp command:
chcp 65001
The above is the detailed content of windows7 set utf8 encoding. For more information, please follow other related articles on the PHP Chinese website!