質問

I am using Solaris 10.

#cat /etc/release
                   Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC
  Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
                            Assembled 23 August 2011

It does not have vim. So, I use vi. But, I am finding that vi is not supporting UTF-8 characters. If I open a file containing UTF-8 characters using vi, it's not able to display them. However, tail is working fine. If I tail the content, it's displaying UTF-8 characters. Even, less is working provided I export LESSCHARSET=utf-8.

So, the question is what I need to do set UTF-8 encoding in vi (NOT vim).

役に立ちましたか?

解決

You need to set your locale to UTF-8. E.g. by setting LC_CTYPE to en_US.UTF-8 (outside of vi).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top