=
=
IntelliJ idea code did not report an error, compilation failed
IntelliJ IDEA newly imported project, the project code did not report an error, but during the compilation process, there will be similar errors, such as missing code format, etc.
Solution to garbled code problem after importing project in eclipse
Eclipse garbled words after importing the project solutions
after importing the project in Eclipse, if the project code in Chinese, may produce Chinese garbled question, take a look at how to solve below
1. Right-click on the project name and select Properties.
. In the right side of the Resource item, find Text File Encoding. By default, Inherited from Container (GBK) is selected, and select Other.
The garbled problem of hot deployment in nginx
Nginx-style IK hot deployment and its messy code problems
1. Create dic file
2 under the sibling directory of nginx. Adds a remote participle to the ik participle configuration file
After
is configured, restart nginx and elastic search.
Linux system configuration is the same as window configuration
if there is a problem with messy code, please see the following messy code solution
Messy code problem solved, pro – test available
1. Add nginx to Server
default_type 'text/html'; charset utf-8;
Add the following code to Elastic
-Xms1g
-Xmx1g
-Dfile.encoding=GBK
Solution to the problem of Chinese garbled in gradle console in idea
Mowday, Xiaoming received the task from his superior and needed to develop a Gradle project in IDEA. When writing the test case, the following error occurred
2. The environment is as follows:
The IDEA 2019.3 Gradle 5.2.1 Java 1.8.0 comes with
3. Try the following
In the IDEA menu File==> Settings==> Edit==> Various UTF-8 are set in File Encoding. No effect. is also configured with UTF-8 in Gradle RunConfigurations. Still no effect of
Gradle and Gradle. Bat both join set DEFAULT_JVM_OPTS=” -dfile.Encoding =UTF-8″. Still not encoding!!
4. Final solution
Edit Help | Edit Custom VM Options in IDEA, adding the following parameters
-Dfile.encoding=UTF-8
The effect is as follows, problem solved
conclusion
In the emergence of Chinese disorderly code problem. The first time I thought of the coding format.
A compilation error occurred during gradle execution. Chinese encoding and IDEA encoding are inconsistent. Therefore, ensuring consistent encoding of the encoding file and IDEA is the key to solving the problem.
In CUSTOMER VM option in IDEA, the file encoding can be customized as UTF-8.
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-2: ordinal not in range(128)
UnicodeEncodeError: ‘ASCII’ Codec can’t encode characters in position 0-2: ordinal not in range(128
Solution:
(1) set the environment variable LANG
, modify ~/.profile file, and execute:
export LANG=“en_US.UTF-8” >> ~/.profile
source ~/.bash_profile
(2) Add UTF-8 to the Python execution command, execute:
export PYTHONIOENCODING=utf-8 >> ~/.bashrc
source ~/.bashrc
Transfer: https://www.cnblogs.com/beile/p/12980149.html