1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-25 23:02:35 +03:00

GH-333 Set $LANG to utf-8 for system clipboard

This commit is contained in:
Tae Won Ha 2016-11-11 14:25:58 +01:00
parent 672f45488b
commit ed5ec0e422
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -129,6 +129,14 @@ static CFDataRef local_server_callback(CFMessagePortRef local, SInt32 msgid, CFD
_neoVimServerTask.standardError = nullFileHandle;
#endif
// Set $LANG to en_US.UTF-8 such that the copied text to the system clipboard is not garbled.
NSMutableDictionary<NSString *, NSString *> *environment = _neoVimServerTask.environment.mutableCopy;
if (environment == nil) {
environment = NSMutableDictionary.new;
}
environment[@"LANG"] = @"en_US.UTF-8";
_neoVimServerTask.environment = environment;
_neoVimServerTask.standardInput = inputPipe;
_neoVimServerTask.currentDirectoryPath = NSHomeDirectory();
_neoVimServerTask.launchPath = shellPath;