Re: feasible smart quote solution

From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Wed Aug 14 2002 - 23:41:51 EDT

  • Next message: Andrew Dunbar: "Re: feasible smart quote solution"

     --- Tomas Frydrych <tomas@frydrych.uklinux.net>
    wrote:
    >
    > I had an idea about the smart quotes. The smartquote
    > problem is
    > algorithmically identical to the shaping of Arabic
    > glyphs.
    > Consequently the internal shaper (in HEAD) could be
    > used to shape
    > quotes on the fly for the screen/printer without
    > changing the actual
    > character in the document. Further, with very little
    > extra effort, the
    > quote translation could be locale- specific, so
    > that, for instance, in
    > Czech the opening quote would placed below the base
    > line.

    This depends what we want "smart quotes" to be.
    Generally it means that when typing (or importing, or
    pasting) into a document, the software intercepts the
    plain ambiguous ' and " characters since they are the
    only ones on a keyboard, and changes them into the
    characters really needed by the current language:
    66 + 99, 6 + 9 for English; << + >>, < + > for French
    (including inner non-breaking spaces), >> + <<, > + <
    for other European languages I've seem - maybe German.
    These are the characters which will be in your
    document permanently. If you don't want them you
    don't
    turn on the smart quotes option.
    Now when displaying these, if they are not availabe in
    the font, a soft remapping on the screen only ought to
    be done and ought to be done for as many missing
    characters as possible. These soft remappings should
    never go into the document permanently.
    A new option if people really want it which I call
    "dumb quotes" could be there to permanently remap all
    smart quotes into plain ambiguous quotes and
    apostrophes. Such an option might live alongside the
    option to permanently remap unavailable fonts. In my
    version of word, this would be the "compatibility"
    section of the options.

    > There are only two small problems with this: (a) the
    > exporters to
    > formats in which smart quotes make sense would need
    > to use the
    > shaping engine to get the correct version into the
    > document; this
    > would be very simple.

    It would probably be best to abstract this codepint
    remapping (libiconv calls this process
    "transliteration") into some place that both the
    shaping engine, the exporters, and in the case of
    "dumb quotes", also the keyboard, paste, and import
    functions.
    This might not actually be doable since I'm not
    familiar with the shaping engine. But we do need
    consistency.

    > (b) mechanism is needed for
    > allowing the user
    > to force the basic quote shape. If the user never
    > wanted this
    > behaviour, they would just turn smart quotes off,
    > there is preference
    > of that. The way I though it could be handled in
    > isolated cases is to
    > tie a zero-width-non-breaking space to some key, say
    > alt+spacebar,
    > and the user could surround such a quote with these
    > spaces, thus
    > making it into stand alone one (== the basic form).
    > I think that this is
    > entirely adequate, for the need to do this will be
    > extremely rare
    > (remember, we do not change the quote code in the
    > document).
    >
    > Any comments?

    To me the stuff with ZWNBS sounds like a hack we don't
    want. I've been thinking about these problems for
    over
    a year now.

    I've discussed most of this in my metabug here:
    Bug 3083 [META] Redesign smart quote system
    http://bugzilla.abisource.com/show_bug.cgi?id=3083

    I also think this bug covers some closely related
    issues:
    Bug 2421 TM, Bullet, Euro, Smart Quotes and other
    symbols originating in Windows Documents
    http://bugzilla.abisource.com/show_bug.cgi?id=2421

    This bug brings up the case of remapping the "TM"
    symbol which I think is important since it requires
    soft-remapping 1 character to 2 characters which I'm
    sure would be troublesome.

    In general I'm not in favour of a "dumb quotes"
    feature since I think most people's hatred of smart
    quotes is due to their hatred for Microsoft and the
    fact that most older Unix fonts didn't contain the
    66 + 99 style quote characters or web pages using
    Windows CodePage 1252 marked as using ISO 8859 1.
    Soft-remapping should make all of this go away, and
    leaving smart quotes turned off will fix the rest.

    Over to the rest of you for further input (:

    Andrew.

    > Tomas

    =====
    http://linguaphile.sourceforge.net/cgi-bin/translator.pl http://www.abisource.com

    __________________________________________________
    Do You Yahoo!?
    Everything you'll ever need on one web page
    from News and Sport to Email and Music Charts
    http://uk.my.yahoo.com



    This archive was generated by hypermail 2.1.4 : Wed Aug 14 2002 - 23:44:36 EDT