2008/6/18 Tony Mechelynck <[EMAIL PROTECTED]>:
>
> On 18/06/08 12:03, björn wrote:
>> 2008/6/18 Tony Mechelynck<[EMAIL PROTECTED]>:
>>> 'encoding' set to UTF-8 means the contents of _files being edited_ are
>>> represented internally as UTF-8. IIUC, the menu locale is defined by
>>> ":language messages" at the time the menu script is sourced:
>>
>> Thanks for clarifying that.  So now that I can't rely on strings in
>> Vim being utf-8, how do I find out which encoding they are in?  (I'm
>> sorry if this is obvious, but all this locale stuff is a bit of a
>> mystery to me.)
>>
>
> Try adding the line
>
>        scriptencoding latin1
>
> near the top of the menufiles, and in any case before the first
> upper-ascii character.

Let me clarify: I am not a script writer, instead I am writing a GUI
port for Mac OS X.  Thus, I need to implement functions like
gui_mch_add_menu_item().  In this function I get passed a pointer to a
vimmenu_T struct which contains a "dname" C-string specifying the name
of a menu item.  My question is: how do I find out which encoding this
C-string is in?

(From your previous post I found out that e.g. gui_mch_draw_string()
will pass strings in the encoding specified by 'enc', thus I can look
at output_conv to determine if I need to convert the string to utf-8
before drawing it.  However, I cannot use the same method to decide if
conversion is necessary for the titles of menu items.)

Björn

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

Raspunde prin e-mail lui