[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim-multibyte
Subject:    Re: Accented chars in menus are "Invalid" using GTK2 on Solaris
From:       Bram Moolenaar <Bram () moolenaar ! net>
Date:       2007-05-11 20:55:22
Message-ID: 200705112055.l4BKtMCS066178 () moolenaar ! net
[Download RAW message or body]


Laurent Blume wrote:

> Hello Bram, thanks for your answer,
> 
> Bram Moolenaar a écrit :
> > It works fine for me.  This is on FreeBSD.
> 
> Well, I was sure it did work for at least some others :-)
> It used to work at some point for me, too, but I think I've had the 
> issue for some time, I don't use the menus much and didn't notice. 
> Version 7.0.183 already had it on S10.
> 
> > I know Solaris has its own version of msgfmt.  Perhaps you used the GNU
> > version?  They are not compatible.  It can be tricky to get the path right.
> 
> With the PATH I set, Solaris' msgfmt is the only one found by configure:
> 
> $ type msgfmt
> msgfmt is /usr/bin/msgfmt
> 
> GNU's version is not installed as part of Solaris. I've got it in 
> /opt/csw/bin/gmsgfmt.
> 
> ./configure said:
> 
> checking --disable-nls argument... no
> checking for msgfmt... msgfmt
> checking for NLS... gettext() works
> checking for bind_textdomain_codeset... yes
> checking for _nl_msg_cat_cntr... no
> 
> 
> > The menu files are in iso-8859-15, thus to get utf-8 a conversion is
> > required.  Perhaps your gettext() doesn't support conversion?
> 
> I'm sure it does,and it can be used either as both Solaris and 
> GNU-compatible, or GNU-compatible only.
> 
>    Solaris and GNU-compatible
>       #include <libintl.h>
> 
>       char *gettext(const char *msgid);
> 
> http://docs.sun.com/app/docs/doc/816-5168/6mbb3hrd5?a=view
> 
> Is there a way I can check if there's something wrong with it? I'm not 
> experienced with gettext() use, but I can rebuild and test anything 
> you'd like.

Sorry for leading you in the wrong direction: the menus are not
processed by gettext().  Only the messages are.

The menu file used is $VIMRUNTIME/lang/menu_fr_fr.latin1.vim.  When
'encoding' is "utf-8" then it will use "scriptencoding latin1", which
will trigger conversion from latin1 to utf-8.

The ":menu File" output should be correct.  If it isn't then there
already was a problem at this point.  You don't set 'encoding' anywhere,
hopefully.  If you change 'encoding' after loading the menus then things
will fail.  Try: ":verbose set encoding?".

-- 
hundred-and-one symptoms of being an internet addict:
107. When using your phone you forget that you don't have to use your
     keyboard.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic