forked from macvim-dev/macvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix MacVim's locale not having encoding when launched from Dock
When launching MacVim not from terminal, macOS doesn't set the $LANG environment variable, and the locale API doesn't have a way to return the encoding (probably because everything is UTF-8). As such Vim would set the locale to something like "en_US", which breaks certain tools that expects an encoding part set. Fix this by simply appending ".UTF-8" to the constructed locale (e.g. "en_US.UTF-8") if $LANG doesn't exist. This makes sense as we default to UTF-8 in MacVim and macOS is basically UTF-8 native anyway. Also, add a test that will make sure this is the case. Fix macvim-dev#1033
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters