For Chinese developers, the log4j output often turns into chaos characters for Chinese text, eg. in email notifications. After inspection, I found the problem is that "Layout.getContentType()" returns "text/plain" by default but there's no standard way to change it. We need it to be "text/plain; charset=GBK", but we could only write our own Layout classes for each of the existing Layout sub-classes. So Layout.setContentType() is urgently expected...
Character encoding and content text are different concepts and it would be wrong to try to combine them. Character encoding is appropriately handled at the appender, not the layout. Layout's are always dealing with UTF-16 characters, the appenders are responsible for converting that to a byte stream. WriterAppender derived appenders have an Encoding attribute that allows you to specify the encoding to be used. Perhaps in your use case, that was not appropriately set or the appender in use does not appropriately control or report the encoding. getContentType() is overriden in application specific layouts such as HTMLLayout (which returns text/ html) and XMLLayout (which I was surprised doesn't return text/xml).
I agree with Curt's comments, so I'm closing this issue. setEncoding methods are available and (in my experience with non-en_us locales) correctly implemented.