Monday, April 8, 2013

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




On Mon, Apr 8, 2013 at 4:59 AM, <aswna2010@gmail.com> wrote:
> 1.  Does your Vim support multibyte (test with :echo has("multi_byte") )?
> 2.  Is a BOMB enabled (:set bomb, tested with :echo &bomb == 1)
>
> 3.  Does the fileencodings support UTF8 ( tested with :echo match(&fileencodings, '\<ucs-bom\|utf\>')   )?
1. Yes (1).
2. No (nobomb).
3. Yes (0).

Last time, as I enabled some of the MsgBox messages in the macro, I could see, it set the unicode variable to True.
Note: a bit strange for me, that after the macro uses the same variable and sets  it to False, and then "Check[s] if there are any unicode characters in the body". Here the macro did not set unicode variable back to True (despite of above characters present in the mail body). I played with keeping the unicode variable to True, in fact the file written out and read by Vim seemed to be Unicode (UTF-16 LE: <fffe>), but Vim could not display it correctly for me, with my settings.

> So, you can do this simple test.
> 1.  Start Vim
> 2.  :set bomb
> 3.  :set filecodings=utf-8
> 4.  :set encoding=utf-8

For the record, in 3 it is fileencodings.
Setting bomb has no effect on the new buffer, so I have set the above in the .vim/after/ftplugin/mail.vim.

> 5.  Make sure the guifont you are using supports the character sets you are displaying.
I am not 100% sure about this. I can tell, that it is possible to enter and see the same characters in Vim directly, but I am not sure if these are really Unicode characters.

> 6.  From Outlook, hit the Edit in Vim button again and see what happens.
The result is the same.

> I have the following in my .vimrc when I want to play with multibyte:
> ...
I have downloaded (and could set DejaVu Sans Mono), set the same config, but it did not help. :(



Let's start with verifying the settings in Vim are compatible with the characters we are trying to get from Outlook.  You indicated above, that you can enter those characters in your Vim by yourself.

Lets try this then.
Start Vim.
Set the required options (encodings, fileencodings).
Copy and paste the body of the Outlook message into Vim.

When you do it this way, how do they show up?

Assuming all was good, save the file.

In the OutlookVim.bas file (as you stated above), force the unicode to be True, and Edit in Vim.

What I am interested in is the differences in the file between the one you copy and pasted, and the one that Outlook saved.  It might even require hex mode to have a look to see what might be different.

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@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: