Loading ...
Sorry, an error occurred while loading the content.

Re: sjis encoding

Expand Messages
  • Bram Moolenaar
    ... You need to have iconv installed. And have that Unicode font, of course. Setting encoding to sjis while your locale is different might work, but you
    Message 1 of 5 , May 3, 2002
    • 0 Attachment
      Hiroshi Iwatani wrote:

      > On our Linux paltform, sometimes we'd like to view and edit Japanese
      > texts documents prepared in the DOS/Windows environment.
      >
      > :set encoding=sjis
      > :set fileencoding=sjis
      >
      > These commands do not bring the expected effects, in fact, any
      > visible effects other than a nonsensical gVim screen.
      >
      > How could we change the encoding from the default locale?

      :set encoding=utf-8
      :set guifont=-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
      :edit ++enc=sjis filename

      You need to have iconv installed. And have that Unicode font, of course.

      Setting 'encoding' to "sjis" while your locale is different might work,
      but you need to figure out a few things to make it work. At least you
      need to use an sjis font (probably with 'guifontset').

      --
      BRIDGEKEEPER: What is your favorite colour?
      LAUNCELOT: Blue.
      BRIDGEKEEPER: Right. Off you go.
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    • MURAOKA Taro
      What distribution of linux do you use? If you use standard Japanese distribution (have iconv library that support sjis encoding) and you ... Regards. ...
      Message 2 of 5 , May 3, 2002
      • 0 Attachment
        What distribution of linux do you use? If you use standard Japanese
        distribution (have iconv library that support sjis encoding) and you
        could edit text files in euc-jp encoding, try below settings:

        :set encoding=japan
        :set fileencodings=iso-2022-jp,sjis,cp932

        Regards.
        ----
        MURAOKA Taro <koron@...>

        # I can answer most of Japanese specific questions.
        # Of cource in Japanese. ;-)


        > On our Linux paltform, sometimes we'd like to view and edit Japanese
        > texts documents prepared in the DOS/Windows environment.
        >
        > :set encoding=sjis
        > :set fileencoding=sjis
        >
        > These commands do not bring the expected effects, in fact, any
        > visible effects other than a nonsensical gVim screen.
        >
        > How could we change the encoding from the default locale?
      • Hiroshi Iwatani
        MURAOKA san Thanks for your info. I ve found that another method, seemingly a simple conversion method, does work. ... It is usable, though not much
        Message 3 of 5 , May 3, 2002
        • 0 Attachment
          MURAOKA san

          Thanks for your info.

          I've found that another method, seemingly a simple conversion
          method, does work.

          :edit ++enc=sjis /mnt/windows/foo.txt
          ...
          :write ++enc=sjis /mnt/windows/foo.txt

          It is usable, though not much impressive.
          A script would be a little bit more convenient:

          #!/bin/sh
          qkc -eu $1
          gvim $1
          qkc -sm $1

          It might be that I'm only seeking some nice 'implemental sugar'
          for an easy/automatic encoding handling. Above method and your
          recommended one, both methods require too many typing on command
          lines!

          For example, could you add an [Encodings] menu or sub-menu
          for a next 6.x release?

          MURAOKA Taro wrote:
          > What distribution of linux do you use? If you use standard Japanese
          > distribution (have iconv library that support sjis encoding) and you
          > could edit text files in euc-jp encoding, try below settings:
          >
          > :set encoding=japan
          > :set fileencodings=iso-2022-jp,sjis,cp932
          >
          > Regards.
          > ----
          > MURAOKA Taro <koron@...>
          >
          > # I can answer most of Japanese specific questions.
          > # Of cource in Japanese. ;-)
          >
          >
          >
          >>On our Linux paltform, sometimes we'd like to view and edit Japanese
          >>texts documents prepared in the DOS/Windows environment.
          >>
          >> :set encoding=sjis
          >> :set fileencoding=sjis
          >>
          >>These commands do not bring the expected effects, in fact, any
          >>visible effects other than a nonsensical gVim screen.
          >>
          >>How could we change the encoding from the default locale?
          >>
          >
          >
          >
        • MURAOKA Taro
          ... Why don t you write those lines in your $HOME/.vimrc? Vim has enough capability in automatic encode handling by using fileencodings option. ... MURAOKA
          Message 4 of 5 , May 3, 2002
          • 0 Attachment
            > Above method and your recommended one, both methods require too many
            > typing on command lines!

            Why don't you write those lines in your $HOME/.vimrc? Vim has enough
            capability in automatic encode handling by using 'fileencodings'
            option.
            ----
            MURAOKA Taro <koron@...>
          Your message has been successfully submitted and would be delivered to recipients shortly.