E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬^[^[

160 views
Skip to first unread message

Peng Yu

unread,
Jan 11, 2019, 5:57:34 PM1/11/19
to vim_use
I got the following error when I run vim on an ubunut docker image. Does anybody know know what is wrong with the vim installation? Thanks.

$ vi
Error detected while processing /root/.vimrc:
line 401:
E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬
Press ENTER or type command to continue
$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2018 21:31:58)
Included patches: 1-1453
Modified by pkg-vim-m...@lists.alioth.debian.org
Compiled by pkg-vim-m...@lists.alioth.debian.org
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_sgr -tag_any_white
+arabic +file_in_path -mouse_sysmouse -tcl
+autocmd +find_in_path +mouse_urxvt +termguicolors
-autoservername +float +mouse_xterm +terminal
-balloon_eval +folding +multi_byte +terminfo
+balloon_eval_term -footer +multi_lang +termresponse
-browse +fork() -mzscheme +textobjects
++builtin_terms +gettext +netbeans_intg +timers
+byte_offset -hangul_input +num64 +title
+channel +iconv +packages -toolbar
+cindent +insert_expand +path_extra +user_commands
-clientserver +job -perl +vertsplit
-clipboard +jumplist +persistent_undo +virtualedit
+cmdline_compl +keymap +postscript +visual
+cmdline_hist +lambda +printer +visualextra
+cmdline_info +langmap +profile +viminfo
+comments +libcall -python +vreplace
+conceal +linebreak +python3 +wildignore
+cryptv +lispindent +quickfix +wildmenu
+cscope +listcmds +reltime +windows
+cursorbind +localmap +rightleft +writebackup
+cursorshape -lua -ruby -X11
+dialog_con +menu +scrollbind -xfontset
+diff +mksession +signs -xim
+digraphs +modify_fname +smartindent -xpm
-dnd +mouse +startuptime -xsmp
-ebcdic -mouseshape +statusline -xterm_clipboard
+emacs_tags +mouse_dec -sun_workshop -xterm_save
+eval +mouse_gpm +syntax
+ex_extra -mouse_jsbterm +tag_binary
+extra_search +mouse_netterm +tag_old_static
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-NQEcoP/vim-8.0.1453=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm

Dominique Pellé

unread,
Jan 11, 2019, 6:32:11 PM1/11/19
to Vim List
PM Peng Yu <peng...@gmail.com> wrote:

> I got the following error when I run vim on an ubunut docker image. Does anybody know know what is wrong with the vim installation? Thanks.
>
> $ vi
> Error detected while processing /root/.vimrc:
> line 401:
> E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬
> Press ENTER or type command to continue
> $ vim --version
> VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2018 21:31:58)
> Included patches: 1-1453
> Modified by pkg-vim-m...@lists.alioth.debian.org
> Compiled by pkg-vim-m...@lists.alioth.debian.org
> Huge version without GUI. Features included (+) or not (-):

You ran 'vi' instead of 'vim'. I'm guessing that 'vi' is not
the same as 'vim' on your machine. vi is probably
vim.tiny without multi-byte. Can you try:

$ type vi
$ vi --version

Dominique

Peng Yu

unread,
Jan 11, 2019, 8:47:03 PM1/11/19
to vim_use
> $ type vi
> $ vi --version

They are the same.

$ diff <(vi --version ) <(vim --version )

--
Regards,
Peng

Peng Yu

unread,
Jan 11, 2019, 8:55:32 PM1/11/19
to vim_use
> I got the following error when I run vim on an ubuntu docker image. Does anybody know what is wrong with the vim installation? Thanks.

Here (scroll toward the end) is the difference between the vim
--version on my mac os (works) and the docker (does not work). I guess
that the problem must be caused by one of the switches. Does anybody
see which switch causes the problem? Thanks.

https://asciinema.org/a/7wfeSOeIiwEuk8TSbvZgdLXga

--
Regards,
Peng

Christian Brabandt

unread,
Jan 12, 2019, 6:13:34 AM1/12/19
to vim_use
Instead of recording a screen session and showing a diff that is hardly
readable, because I cannot even guess what part of the output belongs to
which vim version. So please simply show the output of `vim --version`
of your docker image.

Best,
Christian
--
Alles, was die Menschen in Bewegung setzt, muß durch ihren Kopf
hindurch, aber welche Gestalt es in diesem Kopf annimmt, hängt von den
Umständen ab.
-- Friedrich Engels

Peng Yu

unread,
Jan 12, 2019, 8:29:35 AM1/12/19
to vim_use
It is already shown in the original email. I guess you mean vim on macos?

Here is it.

$ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Dec 13 2018 08:58:43)
macOS version
Included patches: 1-577
Compiled by _datade...@Traviss-Mac-6.local
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +farsi +mouse_sgr -tag_any_white
+arabic +file_in_path -mouse_sysmouse -tcl
+autocmd +find_in_path +mouse_urxvt +termguicolors
+autochdir +float +mouse_xterm +terminal
-autoservername +folding +multi_byte +terminfo
+balloon_eval -footer +multi_lang +termresponse
+balloon_eval_term +fork() -mzscheme +textobjects
+browse +fullscreen +netbeans_intg +timers
++builtin_terms -gettext +num64 +title
+byte_offset -hangul_input +odbeditor +toolbar
+channel +iconv +packages +transparency
+cindent +insert_expand +path_extra +user_commands
+clientserver +job +perl/dyn +vartabs
+clipboard +jumplist +persistent_undo +vertsplit
+cmdline_compl +keymap +postscript +virtualedit
+cmdline_hist +lambda +printer +visual
+cmdline_info +langmap +profile +visualextra
+comments +libcall +python/dyn +viminfo
+conceal +linebreak +python3/dyn +vreplace
+cryptv +lispindent +quickfix +wildignore
+cscope +listcmds +reltime +wildmenu
+cursorbind +localmap +rightleft +windows
+cursorshape +lua/dyn +ruby/dyn +writebackup
+dialog_con_gui +menu +scrollbind -X11
+diff +mksession +signs -xfontset
+digraphs +modify_fname +smartindent +xim
+dnd +mouse +startuptime -xpm
-ebcdic +mouseshape +statusline -xsmp
+emacs_tags +mouse_dec -sun_workshop -xterm_clipboard
+eval -mouse_gpm +syntax -xterm_save
+ex_extra -mouse_jsbterm +tag_binary
+extra_search +mouse_netterm +tag_old_static
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM
-Wall -Wno-unknown-pragmas -pipe -DMACOS_X -DMACOS_X_DARWIN -g -O2
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -fstack-protector -L/usr/local/lib
-L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib
-L/usr/local/opt/readline/lib -L. -fstack-protector -L/usr/local/lib
-L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib
-L/usr/local/opt/readline/lib -L/usr/local/lib -o Vim -framework
Cocoa -framework Carbon -lm -lncurses -liconv -framework AppKit
-fstack-protector
-L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to a topic in the Google Groups "vim_use" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/YyON64D7Zec/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Regards,
Peng

Bram Moolenaar

unread,
Jan 12, 2019, 8:57:44 AM1/12/19
to vim...@googlegroups.com, Peng Yu
> I got the following error when I run vim on an ubunut docker image.
> Does anybody know know what is wrong with the vim installation?
> Thanks.
>
> $ vi
> Error detected while processing /root/.vimrc:
> line 401:
> E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬
> Press ENTER or type command to continue

Looks like the two characters after tab: were corrupted.
Perhaps caused by conversion between encodings.


--
"Hit any key to continue" it said, but nothing happened after F sharp.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Peng Yu

unread,
Jan 12, 2019, 11:04:18 AM1/12/19
to Bram Moolenaar, vim_use
On Sat, Jan 12, 2019 at 7:57 AM Bram Moolenaar <Br...@moolenaar.net> wrote:
>
> > I got the following error when I run vim on an ubunut docker image.
> > Does anybody know know what is wrong with the vim installation?
> > Thanks.
> >
> > $ vi
> > Error detected while processing /root/.vimrc:
> > line 401:
> > E474: Invalid argument: listchars=tab:?~V?\ ,eol:¬
> > Press ENTER or type command to continue
>
> Looks like the two characters after tab: were corrupted.
> Perhaps caused by conversion between encodings.

The files are exactly the same on both systems. So the difference
should be in vim. What vim compile options affect the encodings?

ttys009@10:00:55@~$ grep listchars ~/.vimrc |xxd
00000000: 7365 7420 6c69 7374 6368 6172 733d 7461 set listchars=ta
00000010: 623a e296 b85c 202c 656f 6c3a c2ac 0a b:...\ ,eol:...
ttys009@10:01:06@~$ uname
Darwin

19a9967ba259:pts@16:01:37@~$ grep listchars ~/.vimrc |xxd
00000000: 7365 7420 6c69 7374 6368 6172 733d 7461 set listchars=ta
00000010: 623a e296 b85c 202c 656f 6c3a c2ac 0a b:...\ ,eol:...
19a9967ba259:pts@16:01:43@~$ uname
Linux

--
Regards,
Peng

Peng Yu

unread,
Jan 12, 2019, 2:27:04 PM1/12/19
to Bram Moolenaar, vim_use
It seems that the vim on ubuntu does not recognize the following
triangle character. Any reason why it is so?

- ▸

--
Regards,
Peng

Gary Johnson

unread,
Jan 12, 2019, 3:52:22 PM1/12/19
to vim_use
On 2019-01-12, Peng Yu wrote:
> On Sat, Jan 12, 2019 at 10:04 AM Peng Yu wrote:
I don't know why it isn't working for you. My vim 8.1.685 running
on Ubuntu 16.04.5 LTS and displaying to GNOME Terminal 2.32.0 over
an ssh connection works just fine. I set 'listchars' like this in
my vimrc:

:set listchars+=tab:▸-

where I copied and pasted that triangle from your email.

I also diffed your Ubuntu vim version info against mine and I didn't
see anything obvious to me that would cause such a problem.

(To diff the two "vim --version" outputs, I put them into two
side-by-side buffers (vertically split). Then in each buffer,
I visually-selected the block of features and executed on them:

:s/\_s\+/\r/g
:sort /^./

Finally, I executed:

:windo diffthis

That makes the differences pretty easy to see.)

Could this be a locale issue? Mine is this:

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Regards,
Gary

Tony Mechelynck

unread,
Jan 12, 2019, 4:42:26 PM1/12/19
to vim...@googlegroups.com
I see two possible reasons to this error.

Possibility 1: your Vim does not support multi-byte encodings such as
UTF-8. In that case, the output of ":version" will include -multi_byte
and the answer to ":echo has('multi_byte')" (with the single quotes
but without the double ones) will be 0. If this is the case, the only
solution is to use a more powerful Vim.

Possibility 2: even if Vim was built with +multi_byte, it might not
realize that your vimrc is in UTF-8. In that case, you should add, at
the very top of your vimrc (and in any case before the first line
containing a character with a Unicode codepoint higher than U+007F)
the line

scriptencoding utf-8

See :help :scriptencoding

You might also want to make sure that Vim uses UTF-8 internally at
runtime, and not some 'encoding' incompatible with the characters
you're trying to use.

See https://vim.wikia.com/wiki/Working_with_Unicode


Best regards,
Tony.

Peng Yu

unread,
Jan 12, 2019, 11:20:36 PM1/12/19
to vim_use
I used a docker image of Ubuntu. Where I mounted my home as the home
of root in the docker container.

docker run -it --rm -v "$HOME":/root ubuntu

In the container, I run, then I would see `.vimrc [+] ` at the bottom
meaning the file has been change upon opening.

apt-get update
apt install vim
vim ~/.vimrc

I guess the problem is from the docker image. Could you help try it
and see if you can reproduce the problem?

> :set listchars+=tab:▸-
>
> where I copied and pasted that triangle from your email.
>
> I also diffed your Ubuntu vim version info against mine and I didn't
> see anything obvious to me that would cause such a problem.

--
Regards,
Peng

John Little

unread,
Jan 13, 2019, 2:15:46 AM1/13/19
to vim_use
On Saturday, January 12, 2019 at 11:57:34 AM UTC+13, Peng Yu wrote:
> I got the following error

I looked into this and found a similarly weird bunch of errors, but *only* with my .vimrc.

TL;DR the fileencoding has been detected as latin1, and the "▸" fails to convert to latin1. A solution may be to open the offending file, :set fileencoding=utf-8, then write the file.

The smallest example of the problem I see is a two byte file, with the hex bytes bb 0a:

»

If I edit it with vim, I get a [converted] message and it displays correctly. If I then paste this into it

:set listchars+=tab:▸-

it looks ok, but if I then try to write it, there's conversion errors.

The cause, at least in my case, is that the .vimrc gets a detected with fileencoding=latin1 because there's a byte invalid for utf-8; vim converts it to utf-8 to show it, then converts back to latin1 on writing.

I think my .vimrc is vulnerable to these encoding snafus for two reasons.
Firstly, I like to use weird characters in listchars, for example "»", to use a character that's unlikely to appear in the files I edit.
Secondly, I've copied my .vimrc around many systems, going back decades, going back decades, including presumably systems that did not use utf-8, and it's accumulated a bunch of commented-out settings of listchars that have proved useful on various systems. These have the encoding from those ancient systems, which are not valid utf-8.

I can see someone else having these two things and stumbling into this, perhaps using a conversion library that generates the horrible "?UTF-8?Q?E474:_Invalid_argument:_lis? =?UTF-8?Q?" text.

HTH, and regards, John Little

Tony Mechelynck

unread,
Jan 13, 2019, 11:00:18 AM1/13/19
to vim...@googlegroups.com
On Sun, Jan 13, 2019 at 5:20 AM Peng Yu <peng...@gmail.com> wrote:
>
> I used a docker image of Ubuntu. Where I mounted my home as the home
> of root in the docker container.
>
> docker run -it --rm -v "$HOME":/root ubuntu
>
> In the container, I run, then I would see `.vimrc [+] ` at the bottom
> meaning the file has been change upon opening.
>
> apt-get update
> apt install vim
> vim ~/.vimrc
>
> I guess the problem is from the docker image. Could you help try it
> and see if you can reproduce the problem?

No, I can't try it because I don't have Ubuntu. In the Vim which I
compile myself on openSUSE Linux 15.0 I don't see the problem. Could
you check what I said in my former post?
- What is the answer to ":echo has('multi_byte')" (without the double
quotes but with the single ones)
- What is the answer to ":set encoding?" (without the double quotes
but with the question mark)
- Is there a line "scriptencoding utf-8" (without the quotes) near the
top of your vimrc?


Regards,
Tony.

Peng Yu

unread,
Jan 13, 2019, 12:43:56 PM1/13/19
to vim_use
On Sun, Jan 13, 2019 at 10:00 AM Tony Mechelynck
<antoine.m...@gmail.com> wrote:
>
> On Sun, Jan 13, 2019 at 5:20 AM Peng Yu <peng...@gmail.com> wrote:
> >
> > I used a docker image of Ubuntu. Where I mounted my home as the home
> > of root in the docker container.
> >
> > docker run -it --rm -v "$HOME":/root ubuntu
> >
> > In the container, I run, then I would see `.vimrc [+] ` at the bottom
> > meaning the file has been change upon opening.
> >
> > apt-get update
> > apt install vim
> > vim ~/.vimrc
> >
> > I guess the problem is from the docker image. Could you help try it
> > and see if you can reproduce the problem?
>
> No, I can't try it because I don't have Ubuntu.

You can try docker on either Mac or Linux. Once docker is installed.
It is just one commands (shown in my previous email).

It will host a VM which is Linux.

> In the Vim which I
> compile myself on openSUSE Linux 15.0 I don't see the problem. Could
> you check what I said in my former post?
> - What is the answer to ":echo has('multi_byte')" (without the double
> quotes but with the single ones)

1

> - What is the answer to ":set encoding?" (without the double quotes
> but with the question mark)

encoding=latin1

> - Is there a line "scriptencoding utf-8" (without the quotes) near the
> top of your vimrc?

That does not help.

--
Regards,
Peng

Tony Mechelynck

unread,
Jan 13, 2019, 1:30:45 PM1/13/19
to vim...@googlegroups.com
This is the problematic setting. In Latin1 encoding, Vim can only
represent in its internal memory the 256 characters supported by
Latin1, and that dark triangle is not one of them. See at
https://vim.wikia.com/wiki/Working_with_Unicode (which my previous
post also mentioned) how to set up Vim so that it can handle any
Unicode codepoint.

>
> > - Is there a line "scriptencoding utf-8" (without the quotes) near the
> > top of your vimrc?
>
> That does not help.
>
> --
> Regards,
> Peng
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.

Peng Yu

unread,
Jan 13, 2019, 11:16:46 PM1/13/19
to vim_use
> This is the problematic setting. In Latin1 encoding, Vim can only
> represent in its internal memory the 256 characters supported by
> Latin1, and that dark triangle is not one of them. See at
> https://vim.wikia.com/wiki/Working_with_Unicode (which my previous
> post also mentioned) how to set up Vim so that it can handle any
> Unicode codepoint.

I download the vim source code and compiled it from scratch on the
ubuntu docker container. But vim still does not recognize UTF-8
characters.

Why is it so? Shouldn't vim recognize UTF-8 characters out-of-the-box?

I put the following code at the beginning of my viimrc. I don't see
the problem solved either.

if has("multi_byte")
if &termencoding == ""
let &termencoding = &encoding
endif
set encoding=utf-8
setglobal fileencoding=utf-8
"setglobal bomb
set fileencodings=ucs-bom,utf-8,latin1
endif

--
Regards,
Peng

Tony Mechelynck

unread,
Jan 13, 2019, 11:42:02 PM1/13/19
to vim...@googlegroups.com
On Mon, Jan 14, 2019 at 5:16 AM Peng Yu <peng...@gmail.com> wrote:
>
> > This is the problematic setting. In Latin1 encoding, Vim can only
> > represent in its internal memory the 256 characters supported by
> > Latin1, and that dark triangle is not one of them. See at
> > https://vim.wikia.com/wiki/Working_with_Unicode (which my previous
> > post also mentioned) how to set up Vim so that it can handle any
> > Unicode codepoint.
>
> I download the vim source code and compiled it from scratch on the
> ubuntu docker container. But vim still does not recognize UTF-8
> characters.
>
> Why is it so? Shouldn't vim recognize UTF-8 characters out-of-the-box?

Yes and no. It's complicated to explain.
>
> I put the following code at the beginning of my viimrc. I don't see
> the problem solved either.
>
> if has("multi_byte")
> if &termencoding == ""
> let &termencoding = &encoding
> endif
> set encoding=utf-8
> setglobal fileencoding=utf-8
> "setglobal bomb
> set fileencodings=ucs-bom,utf-8,latin1
> endif
>
> --
> Regards,
> Peng

Somewhere inside that outer if..endif block, add

scriptencoding utf-8

and you might also add the following just before the "endif" line:ee

else
echoerr "Error: Multi-byte not supported"

Then do
:setlocal fenc?
in your vimrc, and if the answer is latin1, hit 8g8 to find any
illegal UTF-8 byte sequences, and if there is one, correct it, then
repeat until there are none left. Then :e to reload it, its
'fileencoding' should be utf-8. Edit it some more if you want. Then
restart Vim.


Best regards,
Tony.

Gary Johnson

unread,
Jan 14, 2019, 12:05:25 AM1/14/19
to vim_use
I'm pretty sure now that this is a conflict between your locale
setting and the character set used in your vimrc. The machine on
which I have docker installed isn't working at the moment, so
I tried a different experiment. On a machine running Ubuntu 16.04,
I executed the following:

$ LANG=POSIX
$ vim
Error detected while processing
/home/gary/.vim/vimrc:
line 928:
E474: Invalid argument: listchars+=tab:�~V�-
Press ENTER or type command to continue
:set enc?
encoding=latin1

I repeated the experiment with LANG=C with the same results. The
error is at the line where I assign your little triangle to
'listchars'. I don't see this error when my locale is set for
UTF-8, as it is by default. This seems to confirm that your docker
installation of Ubuntu is set up for some encoding other than UTF-8.
That locale setting tells vim to expect the files it sources,
including vimrc, to contain only characters from that character set.

As a solution to this, I added the following at the top of my vimrc:

set encoding=utf-8
scriptencoding utf-8

per ":help :scriptencoding".

With that, I see no errors when I start VIM in the POSIX or
C locale.

You could also execute this in your docker container's shell:

$ locale -a

and see if your language and UTF-8 encoding is supported. If it is,
then just set LANG to that in your ~/.profile, or whatever the
preferred file du jour is for that sort of thing these days.

Regards,
Gary

Peng Yu

unread,
Jan 14, 2019, 12:47:25 AM1/14/19
to vim_use
> You could also execute this in your docker container's shell:
>
> $ locale -a
>
> and see if your language and UTF-8 encoding is supported. If it is,
> then just set LANG to that in your ~/.profile, or whatever the
> preferred file du jour is for that sort of thing these days.

This solves the problem. I think that it is the best solution to this problem.

$ locale -a
C
C.UTF-8
POSIX
e000c0cf8d77:pts@05:44:49@~$ export LANG=C.UTF-8
e000c0cf8d77:pts@05:44:57@~$ vim ~/.vimrc

--
Regards,
Peng

Peng Yu

unread,
Jan 14, 2019, 1:05:53 AM1/14/19
to vim_use
But this does not fix this docker image.
(`~/docker_common/pkg/bin/vim` was compiled in the ubuntu docker
container.)

$ docker run -it --rm -v ~/docker_common/pkg:/pkg publicisworldwide/python-conda
[lion@7e85e380877d /]$ /pkg/bin/vim
[lion@7e85e380877d /]$ locale -a |grep -i utf
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN.utf8
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM.utf8
en_ZW.utf8
[lion@7e85e380877d /]$ export LANG=en_US.utf8
[lion@7e85e380877d /]$ /pkg/bin/vim

`set encoding` still gives `latin1`. What is wrong with this docker image?

--
Regards,
Peng

Tony Mechelynck

unread,
Jan 14, 2019, 1:15:34 AM1/14/19
to vim...@googlegroups.com
Try
$ /pkg/bin/vim --version
in the docker image. Does it say +multi_byte or -multi_byte?

Best regards,
Tony.

Peng Yu

unread,
Jan 14, 2019, 5:27:13 AM1/14/19
to vim...@googlegroups.com
Again, it is not the problem of vim binary. The same binary works in the ubuntu docker container.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/YyON64D7Zec/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Regards,
Peng

Ben Fritz

unread,
Feb 9, 2019, 6:17:56 PM2/9/19
to vim_use
Check the output of ":verbose set encoding?"

That should tell you where the option was last set.

Reply all
Reply to author
Forward
0 new messages