vim on RHEL8 does not correctly detect the encoding of Japanese text files

Solution Verified - Updated -

Issue

  • When I open a Japanese text file in vim, the characters are garbled. OS versions prior to RHEL8 do not have this problem when opening the same text file.
  • When I check the encoding of the file with the following command in vim, no encoding is selected. It seems that the encoding detection is failing.

    :set fenc?
    fileencoding=
    

Environment

  • Red Hat Enterprise Linux 8
  • vim

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content