]> git.phdru.name Git - dotfiles.git/blobdiff - .vimrc
Compare $LC_CTYPE with any UTF-8, not just ru_RU.UTF-8
[dotfiles.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index c365a9559360c1e4239eb748e89a498e1e02448a..f064678b59caca2fa064bc47cf5b502e69d338dd 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -471,7 +471,7 @@ if version >= 700
 function! W()
    " let encodings=filter(split(&fileencodings, ','), 'v:val != "ucs-bom"')
    let encodings = ['us-ascii']
-   if $LC_CTYPE == 'ru_RU.UTF-8'
+   if $LC_CTYPE =~ 'UTF-8' " UTF-8 or en_US.UTF-8 or ru_RU.UTF-8 or such
       let encodings += ['utf-8']
    elseif $LC_CTYPE == 'ru_RU.KOI8-R'
       let encodings += ['koi8-r', 'utf-8']