Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Re: VI and JIS text (Not S-JIS)



"Jim O'Connell" <oconnell@example.com> writes:

> This morning, I'm trying to work on some code in vi on Linux,
> specifically some code from the Japanese Windows version of Delphi.
> The problem is, when I boot into Japanese Gnome, Gvim loads the file
> as Shift-JIS, when the encoding is really JIS, so I get 'mojibake'
> for the Japanese text.  I know Gvim has the option of "set
> fe=japan".  (fe stands for File Encoding) I tried "set fe=JIS" but
> that's not a valid option.
>
> Anyone run into this before?  Is there a "set fe=" option that would
> work?
>
> (I don't want to convert the text out of JIS, because I have to drop
> it back into Delphi later to compile.)

> I'm running Delphi for Windows, translating strings J->E.  I set up
> Delphi's editor to display DBCS, but it's that kind of display where
> the Japanese text is not really editable - as soon as you go into
> the word, it stops being really editable - turns into $%*%^$...

Use Vim >= 6.0. You can specify iso-2022-jp encoding when loading a file

    :e ++enc=iso-2022-jp filename

-- 
Mike Fabian   <mfabian@example.com>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links