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

illegal encoding in zh_CN.cp936.po

Expand Messages
  • Danek Duvall
    After changeset 4303f7b6f72f, I m seeing this: OLD_PO_FILE_INPUT=yes msgfmt -v -o zh_CN.cp936.mo zh_CN.cp936.po Processing file zh_CN.cp936.po ... GNU PO file
    Message 1 of 6 , May 23, 2014
    • 0 Attachment
      After changeset 4303f7b6f72f, I'm seeing this:

      OLD_PO_FILE_INPUT=yes msgfmt -v -o zh_CN.cp936.mo zh_CN.cp936.po
      Processing file "zh_CN.cp936.po"...
      GNU PO file found.
      Generating the MO file in the GNU MO format.
      Processing file "zh_CN.cp936.po"...
      ERROR: Line 2899 (zh_CN.cp936.po): Invalid character found.
      make[3]: *** [zh_CN.cp936.mo] Error 2

      GNU msgfmt doesn't have any problems with the file, and Solaris iconv
      doesn't support cp936, but on Linux, I do see

      $ iconv -f cp936 -t utf8 zh_CN.cp936.po| tail
      iconv: illegal input sequence at position 65551
      <output>

      and the output abruptly terminates in the middle of the offending line.

      Thanks,
      Danek

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • Bram Moolenaar
      ... The file is generated from zh_CN.po with the command: iconv -f gb2312 -t cp936 zh_CN.po | sed -e s/charset=gb2312/charset=gbk/ -e s/# Original
      Message 2 of 6 , May 23, 2014
      • 0 Attachment
        Danek Duvall wrote:

        > After changeset 4303f7b6f72f, I'm seeing this:
        >
        > OLD_PO_FILE_INPUT=yes msgfmt -v -o zh_CN.cp936.mo zh_CN.cp936.po
        > Processing file "zh_CN.cp936.po"...
        > GNU PO file found.
        > Generating the MO file in the GNU MO format.
        > Processing file "zh_CN.cp936.po"...
        > ERROR: Line 2899 (zh_CN.cp936.po): Invalid character found.
        > make[3]: *** [zh_CN.cp936.mo] Error 2
        >
        > GNU msgfmt doesn't have any problems with the file, and Solaris iconv
        > doesn't support cp936, but on Linux, I do see
        >
        > $ iconv -f cp936 -t utf8 zh_CN.cp936.po| tail
        > iconv: illegal input sequence at position 65551
        > <output>
        >
        > and the output abruptly terminates in the middle of the offending line.

        The file is generated from zh_CN.po with the command:

        iconv -f gb2312 -t cp936 zh_CN.po | \
        sed -e 's/charset=gb2312/charset=gbk/' -e 's/# Original translations/# Generated from zh_CN.po, DO NOT EDIT/' > zh_CN.cp936.po


        This would suggest that either iconv makes an error or a character is
        not available in the target encoding.

        --
        hundred-and-one symptoms of being an internet addict:
        197. Your desk collapses under the weight of your computer peripherals.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      • lilydjwg
        ... It s strange. The msgid where the corrupted msgstr at is: msgid --remote-silent Same, don t complain if there is no server On the next line,
        Message 3 of 6 , May 25, 2014
        • 0 Attachment
          On Fri, May 23, 2014 at 09:05:20PM +0200, Bram Moolenaar wrote:
          > The file is generated from zh_CN.po with the command:
          >
          > iconv -f gb2312 -t cp936 zh_CN.po | \
          > sed -e 's/charset=gb2312/charset=gbk/' -e 's/# Original translations/# Generated from zh_CN.po, DO NOT EDIT/' > zh_CN.cp936.po
          >
          >
          > This would suggest that either iconv makes an error or a character is
          > not available in the target encoding.

          It's strange. The msgid where the corrupted msgstr at is:

          msgid "--remote-silent <files> Same, don't complain if there is no server"

          On the next line, there is a single byte \xb2 lost.

          I get the same output for this file. But after I edit zh_CN.po by
          deleting the first line or the third line (but not the second), this
          problem disappears. This seems to be an iconv bug.

          BTW, these two files would be the same if the sed command wasn't run.
          I'm not sure what cp936 accurately refers to, but it (and also GBK) must
          be a superset of GB2312. So is this iconv command really needed?

          --
          Best regards,
          lilydjwg

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/d/optout.
        • Danek Duvall
          I ve applied the attached patch to my build, and just set MSGFMT=gmsgfmt in the environment when I run configure. It s yours if you want it, since it seems
          Message 4 of 6 , Jun 2, 2014
          • 0 Attachment
            I've applied the attached patch to my build, and just set MSGFMT=gmsgfmt in
            the environment when I run configure. It's yours if you want it, since it
            seems like a decent addition to the configurability of the build. It's not
            complete, though, since it doesn't handle xgettext and msgmerge, but I
            don't need to run either one as a part of a typical build, and the latter
            at least doesn't have a Solaris "native" version, so we'd end up using the
            GNU version anyway.

            Thanks,
            Danek

            --
            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/d/optout.
          • Bram Moolenaar
            ... Thanks. It s not clear to me how this solves the illegal encoding problem though. Looks like in po/Makefile you could have just changed msgfmt to
            Message 5 of 6 , Jun 3, 2014
            • 0 Attachment
              Danek Duvall wrote:

              > I've applied the attached patch to my build, and just set MSGFMT=gmsgfmt in
              > the environment when I run configure. It's yours if you want it, since it
              > seems like a decent addition to the configurability of the build. It's not
              > complete, though, since it doesn't handle xgettext and msgmerge, but I
              > don't need to run either one as a part of a typical build, and the latter
              > at least doesn't have a Solaris "native" version, so we'd end up using the
              > GNU version anyway.

              Thanks. It's not clear to me how this solves the illegal encoding
              problem though.

              Looks like in po/Makefile you could have just changed "msgfmt" to
              "$(MSGFMT)".


              --
              hundred-and-one symptoms of being an internet addict:
              256. You are able to write down over 250 symptoms of being an internet
              addict, even though they only asked for 101.

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ an exciting new programming language -- http://www.Zimbu.org ///
              \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

              --
              --
              You received this message from the "vim_dev" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/d/optout.
            • Danek Duvall
              ... It doesn t; it just lets me work around it. ... I could have, though a) I wasn t sure if various makes would pass it down to sub-invocations properly, and
              Message 6 of 6 , Jun 3, 2014
              • 0 Attachment
                Bram Moolenaar wrote:

                > Danek Duvall wrote:
                >
                > > I've applied the attached patch to my build, and just set MSGFMT=gmsgfmt in
                > > the environment when I run configure. It's yours if you want it, since it
                > > seems like a decent addition to the configurability of the build. It's not
                > > complete, though, since it doesn't handle xgettext and msgmerge, but I
                > > don't need to run either one as a part of a typical build, and the latter
                > > at least doesn't have a Solaris "native" version, so we'd end up using the
                > > GNU version anyway.
                >
                > Thanks. It's not clear to me how this solves the illegal encoding
                > problem though.

                It doesn't; it just lets me work around it.

                > Looks like in po/Makefile you could have just changed "msgfmt" to
                > "$(MSGFMT)".

                I could have, though a) I wasn't sure if various makes would pass it down
                to sub-invocations properly, and b) configure was checking for msgfmt, but
                never actually using it (as far as I could tell), so I figured that this
                was a piece of configuration that someone simply forgot to hook up.

                Thanks,
                Danek

                --
                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                ---
                You received this message because you are subscribed to the Google Groups "vim_dev" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                For more options, visit https://groups.google.com/d/optout.
              Your message has been successfully submitted and would be delivered to recipients shortly.