Can you try log4j.appender.monappender.Encoding="ISO-8859-1"
in this case your logger output should be a single byte for a é but not 2 as with UTF-8 But I guess that is not your problem. Also you are not telling me with which program your logfile is shown to the user. If your characters are encoded in UTF-8 then any accented character like é is represented by a 2 bytes sequence So it might happen that your logfile is encoded in UTF-8, hence é is actually 2 bytes stored in a logfile! Now opening the log file with microsoft word, and telling word (interactively) that the file has an UTF-8 encoding should make word display the proper é but not 2 characters. If you encode as ISO-8854-1 (as shown above) you need to tell word that the log-file-encoding was done using ISO-8854-1, and word will display é Josef -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Gesendet: Montag, 3. Januar 2011 15:29 An: [email protected] Betreff: Encoding problem Hello I need to print logs containing accentuated characters with a FileAppender. I set the encoding property : log4j.appender.monappender.Encoding=UTF-8 But I still have problems with accents in the resulting log : é instead of é Is this "Encoding" property working ? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
