Reputation: 1982
Is it possible to get ColdFusion to log UTF-8 data (eg: Chinese characters) using <cflog>
?
By default it just logs questions marks instead of the characters.
I know I could open/write/close the log file using the file API, but I'm don't want to over-complicate something as simple as logging.
Upvotes: 3
Views: 568
Reputation: 5678
You may also be able to set log4j.appender.LOGFILE.encoding=UTF-8
in ColdFusion's /lib/log4j.properties
file and not affect the whole VM. Although if Adam's solution works, I'd not necessarily change it.
Upvotes: 2
Reputation: 29870
Yeah, but you need to tell your entire JVM to process files as UTF-8. You can do this via adding this to your java.args in jvm.config:
-Dfile.encoding=utf8
Upvotes: 5