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

Re: Accented chars in menus are "Invalid" using GTK2 on Solaris

Expand Messages
  • Laurent Blume
    Hello Bram, thanks for your answer, ... 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
    Message 1 of 5 , May 11 1:06 PM
      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.

      TIA!

      Laurent
    • Bram Moolenaar
      ... Sorry for leading you in the wrong direction: the menus are not processed by gettext(). Only the messages are. The menu file used is
      Message 2 of 5 , May 11 1:55 PM
        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@... -- 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 ///
      • Laurent Blume
        Bram Moolenaar a écrit : [snip] ... Yes, that s it. I added the set encoding=utf-8 and set fileencoding=utf-8 at the bottom of .vimrc some time ago, and since
        Message 3 of 5 , May 11 2:52 PM
          Bram Moolenaar a écrit :
          [snip]
          > 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?".

          Yes, that's it. I added the set encoding=utf-8 and set
          fileencoding=utf-8 at the bottom of .vimrc some time ago, and since I
          didn't notice immediately the change in the menus, I didn't make the
          relation.
          Obviously, it should have been at the top: it now works fine.
          My apologies for bothering you with that, and thank you very much for
          your help. I'll continue beta-testing happily!

          Laurent
        Your message has been successfully submitted and would be delivered to recipients shortly.