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

Bad UTF8 display on Linux/GTK

Expand Messages
  • Ron Aaron
    Hi, all - Using the latest vim (patchlevel 426), on GTK/Linux, Hebrew no longer displays correctly. It was fine with patchlevel 390, so somewhere in the last
    Message 1 of 9 , Apr 1, 2004
    • 0 Attachment
      Hi, all -

      Using the latest vim (patchlevel 426), on GTK/Linux, Hebrew no longer displays
      correctly. It was fine with patchlevel 390, so somewhere in the last 30
      patches or so the display got messed up. Nothing else in my system changed,
      neither fonts nor anything else (kmail displays the characters just fine, for
      example).

      All you need to do is start gvim on a Linux box, set gfn to something that can
      display Hebrew, set keymap=hebrew and type a few characters. You will see
      <05e4> etc, instead of the proper glyph. Or you can just :help hebrew.txt and
      go to line 88 or so and see the keyboard map displays as I am describing.

      --
      My GPG public key is at http://ronware.org/
      fingerprint: 4E91 06E9 2020 114C 8BCD 55B2 0816 60AF 2B3D 4C51
    • Mikolaj Machowski
      ... Confirming problems with utf-8 and 05e4, just slightly different: Vim 6.2.412 se enc=utf-8 u05e4 insert proper glyph (OK, I don t know if this is
      Message 2 of 9 , Apr 1, 2004
      • 0 Attachment
        Dnia czw 1. kwietnia 2004 19:20, Ron Aaron napisaƂ:
        > Hi, all -
        >
        > Using the latest vim (patchlevel 426), on GTK/Linux, Hebrew no longer
        > displays correctly. It was fine with patchlevel 390, so somewhere in the
        > last 30 patches or so the display got messed up. Nothing else in my
        > system changed, neither fonts nor anything else (kmail displays the
        > characters just fine, for example).
        >
        > All you need to do is start gvim on a Linux box, set gfn to something
        > that can display Hebrew, set keymap=hebrew and type a few characters. You
        > will see <05e4> etc, instead of the proper glyph. Or you can just :help
        > hebrew.txt and go to line 88 or so and see the keyboard map displays as I
        > am describing.

        Confirming problems with utf-8 and 05e4, just slightly different:
        Vim 6.2.412
        se enc=utf-8
        <C-V>u05e4 insert proper glyph (OK, I don't know if this is proper but
        definitely Hebrew ;) but with crazy width - around glyph is much space,
        ca. 2 widths of font itself.

        m.
        --
        LaTeX + Vim = http://vim-latex.sourceforge.net/
        Vim-list(s) Users Map: (last change 10 Mar)
        http://skawina.eu.org/mikolaj/vimlist
        Are You There?
      • Bram Moolenaar
        ... It works fine for me. Are you sure your relevant option settings didn t change? To be sure you can backup to patchlevel 390 and recompile. Is this with GTK
        Message 3 of 9 , Apr 1, 2004
        • 0 Attachment
          Ron Aaron wrote:

          > Using the latest vim (patchlevel 426), on GTK/Linux, Hebrew no longer
          > displays correctly. It was fine with patchlevel 390, so somewhere in
          > the last 30 patches or so the display got messed up. Nothing else in
          > my system changed, neither fonts nor anything else (kmail displays the
          > characters just fine, for example).
          >
          > All you need to do is start gvim on a Linux box, set gfn to something
          > that can display Hebrew, set keymap=hebrew and type a few characters.
          > You will see <05e4> etc, instead of the proper glyph. Or you can just
          > :help hebrew.txt and go to line 88 or so and see the keyboard map
          > displays as I am describing.

          It works fine for me.

          Are you sure your relevant option settings didn't change?
          To be sure you can backup to patchlevel 390 and recompile.

          Is this with GTK 1 or 2?

          --
          hundred-and-one symptoms of being an internet addict:
          229. You spend so much time thinking what to add on this list.

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
          \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
        • Ron Aaron
          ... What are the relevant options? My enc and gfn have not changed. This is GTK2, and it all worked fine a week ago before I upgraded vim. I even did a
          Message 4 of 9 , Apr 1, 2004
          • 0 Attachment
            On Thursday 01 April 2004 10:54 am, Bram Moolenaar wrote:

            >
            > It works fine for me.
            >
            > Are you sure your relevant option settings didn't change?
            > To be sure you can backup to patchlevel 390 and recompile.

            What are the relevant options? My enc and gfn have not changed. This is
            GTK2, and it all worked fine a week ago before I upgraded vim. I even did a
            'make distclean' and 'configure --with-features=big' to make sure I've got a
            sane build.
          • Bram Moolenaar
            ... It s difficult to say which options matter. At least fileencoding and fileencodings . Since you mention characters being displayed as , Vim
            Message 5 of 9 , Apr 1, 2004
            • 0 Attachment
              Ron Aaron wrote:

              > > It works fine for me.
              > >
              > > Are you sure your relevant option settings didn't change?
              > > To be sure you can backup to patchlevel 390 and recompile.
              >
              > What are the relevant options? My enc and gfn have not changed. This is
              > GTK2, and it all worked fine a week ago before I upgraded vim. I even did a
              > 'make distclean' and 'configure --with-features=big' to make sure I've got a
              > sane build.

              It's difficult to say which options matter. At least 'fileencoding' and
              'fileencodings'. Since you mention characters being displayed as
              <xxxx>, Vim considers the characters not printable. Perhaps something
              went wrong in mbyte.c?

              Since it works for me with GTK 2, I don't think Vim itself is completely
              broken. There must be something in your setup that makes it happen.

              Hmm, perhaps you have the wcwidth() function. Patch 6.2.404 uses it if
              it's available. That would mean your system has a broken wcwidth()
              function. Search for wcwidth() in src/mbyte.c.

              --
              A computer without Windows is like a fish without a bicycle.

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
              \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
            • Ron Aaron
              ... That s the culprit! I put the following at the top of mbyte.c after the header files, and gvim works again: #undef __STDC_ISO_10646__ -- My GPG public key
              Message 6 of 9 , Apr 1, 2004
              • 0 Attachment
                On Thursday 01 April 2004 01:18 pm, Bram Moolenaar wrote:
                > Hmm, perhaps you have the wcwidth() function. Patch 6.2.404 uses it if
                > it's available. That would mean your system has a broken wcwidth()
                > function. Search for wcwidth() in src/mbyte.c.

                That's the culprit!

                I put the following at the top of mbyte.c after the header files, and gvim
                works again:

                #undef __STDC_ISO_10646__


                --
                My GPG public key is at http://ronware.org/
                fingerprint: 4E91 06E9 2020 114C 8BCD 55B2 0816 60AF 2B3D 4C51
              • Bram Moolenaar
                ... Well, so much for using a standard library function to improve quality. I suspect your problem is the iswprint() function. Where do these iswprint() and
                Message 7 of 9 , Apr 2, 2004
                • 0 Attachment
                  Ron Aaron wrote:

                  > On Thursday 01 April 2004 01:18 pm, Bram Moolenaar wrote:
                  > > Hmm, perhaps you have the wcwidth() function. Patch 6.2.404 uses it if
                  > > it's available. That would mean your system has a broken wcwidth()
                  > > function. Search for wcwidth() in src/mbyte.c.
                  >
                  > That's the culprit!
                  >
                  > I put the following at the top of mbyte.c after the header files, and gvim
                  > works again:
                  >
                  > #undef __STDC_ISO_10646__

                  Well, so much for using a standard library function to improve quality.
                  I suspect your problem is the iswprint() function.

                  Where do these iswprint() and wcwidth() functions come from? What
                  library are you using?

                  --
                  Get a life? What is the URL where it can be downloaded?

                  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                  /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                  \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
                  \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
                • Ron Aaron
                  ... I m using gcc 3.2.3, and the iswprint() comes from libc (/usr/lib/) and it s ver 2.3.2 -- My GPG public key is at http://ronware.org/ fingerprint: 4E91
                  Message 8 of 9 , Apr 2, 2004
                  • 0 Attachment
                    On Friday 02 April 2004 12:47 am, Bram Moolenaar wrote:
                    > Well, so much for using a standard library function to improve quality.
                    > I suspect your problem is the iswprint() function.
                    >
                    > Where do these iswprint() and wcwidth() functions come from? What
                    > library are you using?

                    I'm using gcc 3.2.3, and the iswprint() comes from libc (/usr/lib/) and it's
                    ver 2.3.2

                    --
                    My GPG public key is at http://ronware.org/
                    fingerprint: 4E91 06E9 2020 114C 8BCD 55B2 0816 60AF 2B3D 4C51
                  • Bram Moolenaar
                    ... I suppose that is a common version. That means more people could run into it. Well, it appears the idea that a standard library function would work better
                    Message 9 of 9 , Apr 2, 2004
                    • 0 Attachment
                      Ron Aaron wrote:

                      > On Friday 02 April 2004 12:47 am, Bram Moolenaar wrote:
                      > > Well, so much for using a standard library function to improve quality.
                      > > I suspect your problem is the iswprint() function.
                      > >
                      > > Where do these iswprint() and wcwidth() functions come from? What
                      > > library are you using?
                      >
                      > I'm using gcc 3.2.3, and the iswprint() comes from libc (/usr/lib/)
                      > and it's ver 2.3.2

                      I suppose that is a common version. That means more people could run
                      into it.

                      Well, it appears the idea that a standard library function would work
                      better than what we include with Vim was wrong. I suppose we should
                      back out patch 6.2.404 then. Does anyone object to that?

                      --
                      Hear about the guy who played a blank tape at full blast?
                      The mime next door went nuts.

                      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
                      \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
                    Your message has been successfully submitted and would be delivered to recipients shortly.