Eclipse Chinese garbled

Source: Internet
Author: User
Tags log4j

Problem Description:

In the import log4j.properties file, there is a Chinese garbled, as follows:

###设置## #log4j. Rootlogger=debug,stdout,d,e###è¾?å?ºä¿¡æ?¯å?°æ?§å?¶å?°## #log4j. Appender.stdout=Org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.Target=System.outlog4j.appender.stdout.layout=Org.apache.log4j.PatternLayoutlog4j.appender.stdout.layout.ConversionPattern= [%-5p]%d{hh:mm:ss,sss} method:%l%n%m%n###è¾?å?ºdebug级å?« Ä»¥ä¸?ç?? Æ?¥å¿?å?°=e://Logs/error.log # # #LOG4J.APPENDER.D =Org.apache.log4j.dailyrollingfileappenderlog4j.appender.d.file= E://Logs/info1.logLog4j.appender.d.append =trueLog4j.appender.d.threshold=INFO log4j.appender.d.layout=Org.apache.log4j.patternlayoutlog4j.appender.d.layout.conversionpattern=%-d{yyyy-mm-dd HH:mm:ss} [%t:%r]-[%p]%m%n

Cause resolution:

Not parsed in Chinese code.

Requires UTF-8 encoding

Solution:

In Eclipse's Packege explore view, right-click on the Log4j.properties-"properties--" resource--"Text file encoding--" Others:utf-8

  

Paste the other garbled solution that will appear:

Http://www.cnblogs.com/not-NULL/p/5143162.html

Eclipse Chinese garbled

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.