Home > Article > Development Tools > phpstorm console garbled code
The program written by phpstorm outputs garbled characters when running on the console. The reason is that the default character encoding of this open source project is wrong, so the character encoding of the console automatically changes to UTF-8, and the default format of the keyboard input stream is GBK format, which causes the problem when converting to GBK. Odd garbled errors generated during UTF-8 (explanation of this problem can be found in search engines). The following is a solution to this error
Recommended tutorial:phpstrom installation and use tutorial
Solution:
1. Right-click in the code area -> run as -> run configurations -> common (right side) -> console encoding. Because this error occurs, the encoding format at this time should be UTF-8. Select Other. There may not be a GBK option at this time. If not, perform the following operations.
2. Change the text file encoding of the project, right-click on the project -> properties -> resource -> First adjust the text file encoding back to GBK, and then go back and reset the console encoding to GBK.
Extension information
PhpStorm is a commercial PHP integrated development tool developed by JetBrains, aiming to improve user efficiency. It can deeply understand the user's coding, provide intelligent code completion, fast navigation and instant error checking.
Function introduction
Smart PHP editor
● PHP Code completion.
●Intelligent duplicate code detector.
● PHP refactoring.
● Support Smarty and PHPDoc.
● Support multi-language mixing.
JavaScript Editor
● Completed based on DOM/specified browser.
● Code navigation and usage search.
● JavaScript refactoring.
● JavaScript debugger.
HTML/CSS Editor
● Support HTML5.
● Support Zend encoding.
●Inspection and quick correction.
●Display the appearance of the application.
●Extract embedded styles.
Lightweight IDE
●Easy to install.
●Can run on Windows, Mac OS X, Linux.
●The project configuration is simple - you can open the code anywhere and start working.
●Performance is priority.
Intelligent environment
● Visualize the PhP unit test runtime.
● VCS supports SVN, Git, Mercurial, etc.
● Support FTP and remote file synchronization.
●Can record local modifications.
●Visual debugging.
● A debugger that does not require any configuration.
● Support setting breakpoints in PHP, JS, and HTML.
●Observation variables, windows.
●Batch code analysis.
●Integrated analyzer.
The above is the detailed content of phpstorm console garbled code. For more information, please follow other related articles on the PHP Chinese website!