I use TeamCity for continious integration. Solution checkouts on deploy machine and builds. Deploy machine running under Windows Server 2008 R2 - Russian. There are russian language PowerShell installed etc. In TeamCity build log, all russian symbols are in wrong encoding.
How to change encoding in build log?
change encoding for log4j configuration for build log in
conf/teamcity-agent-log4j.xml
add file.encoding=UTF-8 parameter
launcher/conf/wrapper.conf
that uses agent on start you should add it like thatadd
-Dfile.encoding=UTF-8
inJAVA_OPTS
that steps helps me but now i have a bug - if you watching tail new Russian symbols in log replaced by "?". after refreshing the page they shown correct.
For me, on TeamCity 7 and TeamCity 8, helped editing file teamcity-agent-log4j.xml:
and restarting TeamCity after that.
But encoding is correct only after refreshing the log page.
For me, on Windows 7, TeamCity 9.0.3 helped adding "teamcity.runner.commandline.stdstreams.encoding=866" line into the buildAgent.properties file. I've got the encoding value by typing "chcp" in the command prompt.
For Teamcity 9 the next had helped:
(do this being on your agents)
After that - restart the agent: