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

137128Re: UFT-8/16 help needed (How to set up Outlook 2010 / Vim 7.3 to have OutlookVim with Unicode (UTF-8) support?)

Expand Messages
  • David Fishburn
    Apr 8, 2013
    • 0 Attachment



      On Mon, Apr 8, 2013 at 10:31 AM, <aswna2010@...> wrote:
      Hi David
      > Assuming all was good, save the file.
      Yes, it was successful.

      I have sourced the following .vim\after\ftplugin\mail.vim:
      set bomb
      set encoding=utf-8
      set fileencoding=utf-8
      set termencoding=utf-8

      The hexdump results of the two-character long mail body of "őű".
      1. Copy-paste (from Outlook to Vim).
      0000000 bbef c5bf c591 0db1 000a
      0000009

      2. Using the macro as it is.
      0000000 bbef 6fbf 0a75
      0000006

      3. Modified the macro to force unicode (utf-16).
      0000000 bbef efbf bebf 84e5 e781 8184 a8e0 0d80
      0000010 000a
      0000011

      4. Modified the macro the force unicode (utf-8).
      0000000 bbef 3fbf 513f 7101 0a01 0a00
      000000c

      Here I called "force unicode": commented line 201 in the macro, where unicode variable is set to False.


      I think we need a bit of help from the multi_byte community.

      Background:

      From Visual Basic code we are using CreateTextFile() with the unicode flag turned on.

      This apparently writes out a file in unicode.

      We want to open this file in Vim, but can't really figure out what settings and command lines to use to successfully open the file. 

      I am having a hard time with Google and Microsoft trying to determine when CreateTextFile() is used, what type of encoding is used on the file.
      I believe it has a BOMB and it might be utf-16.

      Assuming this, I thought the following would be enough for Vim to open the file successfully:
      :set fileencodings=utf-8,ucs_bom,utf-16
      :e ++enc=utf-16 myfile

      If you look at the HEX above, does it help anyone?

      Thank you.
      David

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
       
      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
       
       
    • Show all 4 messages in this topic