On 20/06/08 02:41, Ben Schmidt wrote:
>> Well, for this plugin I've been saving 'encoding' and changing it to
>> "latin1" before I define the menus, then restoring the 'encoding'
>> option.
>
> That is a Bad Thing to do. It will almost certainly result in invalid
> menus on many systems, as it is in MacVim. As documented at :help
> 'encoding', chaning the value of 'encoding' may invalidate text and
> menus must be reloaded after doing so. Thus actually changing 'encoding'
> in your menu definitions means they need to be reloaded straight away,
> which is certainly not a situation you want to be in!
>
>> Changing it to use ":scriptencoding latin1" as Tony
>> Mechelynck suggested elsewhere in the thread doesn't really seem to
>> work right.
>
> This is the right way to do it. Could you explain what specific problems
> this causes for your plugin? We should figure out how to fix those
> problems while using :scriptencoding.
>
> I'll download it later and see how it behaves, too. Can you point me to
> its web home?
>
> Cheers,
>
> Ben.

":scriptencoding" must be in the script itself. It acts from the next 
line to the next ":scriptencoding" command or to the end of the script, 
whichever comes sooner, and doesn't apply to other scripts sourced from 
within that range.

 From ":help :scriptencoding": if a script starts with a BOM in UTF-8 
format, that will be recognised, just as if the script had started with 
"scriptencoding utf-8".


Best regards,
Tony.
-- 
hundred-and-one symptoms of being an internet addict:
13. You refer to going to the bathroom as downloading.

13 bis. You refer to going to the bathroom as uploading. Downloading 
means going to the restaurant.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui