As shown in figure, like this, because the project want to utf-8, tomcat configuration file change after again the info inside output will repeat and character problems
CodePudding user response:
Obvious spelling a string in the iteration,
CodePudding user response:
reference 1st floor icoolno1 response: spelling a string in the iteration, No, originally in logging. The properties in this file is normal output with GBK code words, tomcat command line window and the file into a utf-8 before that happens CodePudding user response:
Are you to ask questions or would like to ask what the statement, look at this situation, it's like you behind the log with a System. Out. The println (); As the output CodePudding user response:
Post your log configuration, let everyone together to help you see CodePudding user response:
This is logback configuration file & lt; ? The XML version="1.0" encoding="utf-8"?> % d {MM - dd yyyy - HH: MM: ss. The SSS} logger - 5 level thread] [% % % % {50} % L - MSG % n The ${LOG_HOME}/all - logs. % d - the dd} {yyyy - MM. The log 30 & lt;/MaxHistory> % d {MM - dd yyyy - HH: MM: ss. The SSS} logger - 5 level thread] [% % % % {50} % L - MSG % n 10 MB & lt;/MaxFileSize> ${LOG_HOME}/bsConfig % d - the dd} {yyyy - MM. The log 30 & lt;/MaxHistory> % d {MM - dd yyyy - HH: MM: ss. The SSS} logger - 5 level thread] [% % % % {50} % L - MSG % n 10 MB & lt;/MaxFileSize> ${LOG_HOME}/httplog. % d - the dd} {yyyy - MM. The log 30 & lt;/MaxHistory> % d {MM - dd yyyy - HH: MM: ss. The SSS} logger - 5 level thread] [% % % % {50} % L - MSG % n 10 MB & lt;/MaxFileSize> Then the tomcat configuration is in: 1. Catlina. Bat set set "JAVA_OPTS LOGGING_CONFIG JAVA_OPTS=% % % % - Dfile. The encoding=utf-8" 2. Logging. The properties set Java. Util. Logging. ConsoleHandler. Encoding=utf-8, this file will also changed around such 3. Then change the Tomcat CMD window encoding to utf-8 (65001) Now the question is, logback configuration inside is remained unchanged, but before the tomcat various configuration Settings for GBK words CMD window display is normal, then the tomcat configuration inside such as utf-8 will appear these problems CodePudding user response:
refer to "the other shore flower reply: 3/f do you want to ask the statement of the problem or what to ask, see this situation, it's like you behind the log with a System. Out. The println (); Output as With GBK code before the output is not a problem, have a problem switching to utf-8 CodePudding user response:
The configuration file for all utf-8, some have no change for sure CodePudding user response:
Has been GBK before? Like GBK and UTF character set at the time of conversion, because stored bytes, so some words must have the code sample, CodePudding user response:
refer to 7th floor careful boy reply: configuration file with utf-8 encoding, all have no replacement sure nullnullnullnullnullnullnullnull