I use Java and Log4j..
I want to log a string with german special characters, like for example Ü Ä ä etc.. But in my LogFile it appears like this:
<E4><FC><F6>
log4j.properties
log4j.rootLogger = ALL, rollingFile
log4j.appender.rollingFile=org.apache.log4j.RollingFileAppender
log4j.appender.rollingFile.File=/home/tomcat/logs/debug.log
log4j.appender.rollingFile.MaxFileSize=10MB
log4j.appender.rollingFile.MaxBackupIndex=2
log4j.appender.rollingFile.layout = org.apache.log4j.PatternLayout
log4j.appender.rollingFile.layout.ConversionPattern=%d %p %c - %m%n
log4j.appender.rollingFile.encoding=UTF-8
According to the most posted issues about encoding with Log4J there doesnt seem to be any known issues, therefor i assume you are using a wrong encoding while opening the file, try to check the editor and system encoding maby you will find there an issue.
You should try the below code for storing and retriving the values in the unicode format
Output