Open themadsens opened 7 years ago
Go's runtime is not affected by the locale. So if the binary is changed, there migit be caused by pbcopy or pbpaste. I guess that it is the locale of the server is C or latin-1.
Hey, guys.
I suffer the same problem. If you use Supervisord as your local process manager you should add some environment variables into supervisord.ini
to fix the encoding problem.
example:
[supervisord]
...
environment=LC_ALL=en_US.UTF-8,LANG=en_US.UTF-8
For people who uses MacOS as the server and manage the process by launchctl, you may want to add a environment.plist in ~/Library/LaunchAgents
with the content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>environment</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>
<!-- Add locale category for native language -->
<!-- For me, it's zh-CN.UTF-8 -->
launchctl setenv LANG zh_CN.UTF-8
launchctl setenv LC_ALL zh_CN.UTF-8
</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Then load it by launchctl load environment.plist
. It works now.
It seems that lemonade cannot handle utf-8 in and out of the clipboard. At least on MacOS.
As long as lemonade is used for both directions it seems OK, but using pbcopy or the system 'Copy' or 'Paste' in conjunction does not work
OS data according to screenfetch OS: 64bit Mac OS X 10.12.6 16G29 Kernel: x86_64 Darwin 16.7.0
In binary