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

MacOS X, iconv and gettext emulation (3rd version)

Expand Messages
  • MURAOKA Taro
    I have updated my previous patch. Available here: http://www.kaoriya.net/testdir/macosx.20020919.tar.gz Apply this patch against 6.1.186 source tree. Compile
    Message 1 of 3 , Sep 18, 2002
    • 0 Attachment
      I have updated my previous patch. Available here:

      http://www.kaoriya.net/testdir/macosx.20020919.tar.gz

      Apply this patch against 6.1.186 source tree.
      Compile command examples are below:

      % cd vim61
      % tar xzvf macosx.20020919.tar.gz
      % patch -p1 < macosx.20020919.diff
      % cd src
      % make -f Make_osx.mak

      If you want to get all translated messages, try this command when
      execute make command:

      % make -f Make_osx.mak MULTILANG=all

      See src/Make_osx.mak for more details about compile options.

      I have tested this patch on only MacOS X (10.2.1).

      Benji Fisher wrote:
      > When you post your next version, please
      > say how you get the right ASCII code, so that I can try to reproduce it

      First, I started gvim from Terminal to avoid sourcing any setting files.
      % ./gvim.app/Contents/MacOS/gvim -u NONE -U NONE
      Then, set options.
      :set gfn=Monaco:h9 enc=macroman fenc=latin1
      And, input a character e' to a buffer, like this.
      i<C-K>e'<ESC>
      Last, saved it to a file.
      :w out.txt
      I confirmed this file using command od.
      % od -x out.txt
      It seems out.txt has right value <e9>.

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


      Summary of changes: ('+' indicates new item.)
      - Add, Makefile for MacOS X.
      - Add, controlled INPUT METHOD, like Windows.
      - Add, inline INPUT METHOD.
      - Add, iconv emulation using MacOS X's TEC Manager.
      - Add, gettext emulation using MacOS X's CFBundle.
      - Add, files and directories required by CFBundle.
      - Add, tools for multi language support.
      - Add, TRACE() for debug.
      - Fix, filepath completion doesn't complete directory separator.
      - Fix, to suppress many compile warings.
      - Tested on Jaguar (Mac OS X 10.2)
      - Fix, broken message.
      - Add, builder can change application name.
      - Add, support Drag & Drop (Peter "Rain Dog" Cucka)
      - Add, support Douglas's icons. (see Make_osx.mak)
      - Fix, to suppress other compile erros and warings.
      + Tested on Jaguar (Mac OS X 10.2.1)
      + Add, Axel Kielhorn's patches (integrate).
      (But I can't test those for Classics.)
      + Fix, iconv problems on MacRoman (trial).
      + Fix, name of directory where object files are outputed to.

      Hint:
      - Set your menu language to 'langmenu' option before menu.vim is
      loaded.
      - If you want to use with europian language, you shoud set
      'encoding' option "MacRoman", which is default encoding on MacOSX.
      - Language which used for message translation is depend on MacOSX
      sytem preferences. See "System Preferences" -> "International" ->
      "Language"
      - When Vim hangs on start up, please try to delete or rename your
      viminfo file. Normally, viminfo is named "~/.viminfo".
    • Sébastien Pierre
      ... Yes, it works for me :) There still a small problem: when using ga on the é character I get while it is written as . Thanks for this great
      Message 2 of 3 , Sep 19, 2002
      • 0 Attachment
        Le jeudi, 19 sep 2002, à 05:48 Europe/Paris, MURAOKA Taro a écrit :

        > It seems out.txt has right value <e9>.

        Yes, it works for me :)
        There still a small problem: when using 'ga' on the 'é' character I get
        <8E> while it is written as <E9>.

        Thanks for this great fix anyway, keep on!

        -- Sébastien

        --
        «children are innocent / a teenager's fucked up in the head /
        adults are even more fucked up / and elderlies are like children»
        <http://www.type-z.org> -- Porno For Pyros, Pets
      • Sébastien Pierre
        ... I would also add that loading a latin1 file even with fileencodings=latin1 does display not display the E9 character properly. It seems like vim properly
        Message 3 of 3 , Sep 19, 2002
        • 0 Attachment
          Le jeudi, 19 sep 2002, à 05:48 Europe/Paris, MURAOKA Taro a écrit :

          > I have updated my previous patch. Available here:
          > http://www.kaoriya.net/testdir/macosx.20020919.tar.gz

          I would also add that loading a latin1 file even with
          fileencodings=latin1 does display not display the E9 character
          properly. It seems like vim properly does buffer->file encoding (or
          ui_input->buffer, I don't know), but it does not seem to handle
          filer->buffer (resp. buffer->ui_output) properly :(

          Here is a test:
          - open a latin1 file with 'é' (<E9>) characters
          - :set fileencoding=1
          - type some 'é'
          - save the file

          Read the file from a terminal using 'less', you should now have <C8>
          instead of original 'é' (which is actually the latin1 code for 'È') and
          newly typed 'é' properly stored as <E9>. Vim does assume the file it
          reads is in MacRoman (because encoding=MacRoman) but seems to ignore
          the value of fileencodings. BTW I wonder how if it possible to tell vim
          to convert a buffer from one encoding to another?

          -- Sébastien

          --
          «My friends says we're like the dinosaurs, only we are doing
          ourselves in much faster than they ever did.»
          <http://www.type-z.org> -- Porno For Pyros, Pets
        Your message has been successfully submitted and would be delivered to recipients shortly.