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

Re: Printing 8-bit encodings

Expand Messages
  • Glenn Maynard
    ... MBCS specifically doesn t refer to encodings like UTF-32. Encodings which use a fixed multiple number of bytes per codepoint[1] are wide strings. C makes
    Message 1 of 9 , May 7, 2003
      On Wed, May 07, 2003 at 10:19:56PM +0200, Tony Mechelynck wrote:
      > The distinction I make (probably unnecessarily, I agree on that) is that
      > there are encodings like UTF-32, which use more than one byte (in this case,
      > 32 bits fixed-width) for every character (or codepoint, to be more precise);
      > while for some languages like English or even (but to a lesser degree)
      > French or Spanish, UTF-8 is "almost" a single-byte encoding. In this case of
      > course the subject was Russian, and that is almost the opposite case, since
      > there every alphabetic character is two bytes, while only digits and
      > punctuation signs (spaces, commas, colons, semicolons, full stops...) are
      > single-byte.

      MBCS specifically doesn't refer to encodings like UTF-32. Encodings
      which use a fixed multiple number of bytes per codepoint[1] are wide
      strings. C makes this distinction; eg. see mbstowcs and wcstombs.

      The difference is that SBCS, MBCS and DBCS strings are normally stored
      in the same way--strings of bytes (char *). Wide strings normally have
      a different natural layout, eg (wchar_t *).

      [1] ignoring surrogate pairs, which are also used in wide strings

      --
      Glenn Maynard
    • Tony Mechelynck
      ... printencoding seems quite new. New in 6.2 maybe? (I don t see it in the helpfiles that came with 6.1.469, and the corresponding executable spits error at
      Message 2 of 9 , May 7, 2003
        Bram Moolenaar <Bram@...> wrote:
        > Valery Kondakoff wrote:
        >
        > > > Added support for PostScript printing of various 8-bit encodings.
        > > > (Mike Williams)
        > >
        > > I'm not sure this patch was supposed to fix this, but it is still
        > > impossible to print Russian text when 'encoding' is set to 'utf-8'.
        > > When I set 'encoding' to 'cp1251' the Russian text is printed
        > > correctly.
        >
        > Please read the docs on this: ":help 'printencoding'" and everything
        > below ":help :hardcopy".
        >
        > --
        > I noticed my daughter's Disney-net password on a sticky note:
        > "MickeyMinnieGoofyPluto". I asked her why it was so long.
        > "Because they say it has to have at least four characters."
        >
        > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net
        > \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org
        > \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org
        > /// \\\ Help AIDS victims, buy at Amazon --
        > http://ICCF.nl/click1.html ///

        'printencoding' seems quite new. New in 6.2 maybe? (I don't see it in the
        helpfiles that came with 6.1.469, and the corresponding executable spits
        error at ":set printencoding?".) Any idea of an ETA (oh, even not a precise
        date but a "rough order of magnitude", i.e. error -90%, +900%) for a
        "stable" 6.2 ? [Say "five weeks" and I will expect it "some time between
        three days and a year from now" :-).]

        Regards,
        Tony.
      • Tony Mechelynck
        Glenn Maynard wrote: [...] ... I stand corrected. Tony.
        Message 3 of 9 , May 7, 2003
          Glenn Maynard <glenn@...> wrote:
          [...]
          > MBCS specifically doesn't refer to encodings like UTF-32. Encodings
          > which use a fixed multiple number of bytes per codepoint[1] are wide
          > strings. C makes this distinction; eg. see mbstowcs and wcstombs.
          >
          > The difference is that SBCS, MBCS and DBCS strings are normally stored
          > in the same way--strings of bytes (char *). Wide strings normally
          > have
          > a different natural layout, eg (wchar_t *).
          >
          > [1] ignoring surrogate pairs, which are also used in wide strings
          >
          > --
          > Glenn Maynard

          I stand corrected.

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