samw

samw

github

Solution for Chinese character garbled code in Subversion hooks script

When writing SVN Hooks scripts, there may be Chinese garbled characters when obtaining commit comments and other content through svnlook, similar to the situation shown in the figure below.

svnlook-log

The solution is very simple, just add an environment variable at the beginning of the script:

# The value of LANG may be different in different system environments
# Common values include en_US.UTF-8, zh_CN.UTF-8, zh_CN.GBK, zh_CN.GB2312, etc.
export LANG=en_US.UTF-8

svn hooks encounter garbled characters in Chinese

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.