#25 Convert ACS symbols to ascii lookalikes when selecting


At the moment, when selecting text that includes ACS
line drawing characters, the characters in the cut
buffer come out as the letters that have the same code
as these symbols, and so they look pretty
indecipherable after pasting into another window. I've
written a patch to allow the symbols to instead be
translated into the ascii characters that most resemble
each symbol.

The array `char acs_ascii[]' contains the translations
from the letter code to the character that should be
copied into the cut buffer. The values I've used here
were written specifically for nethack screenshots, and
include some characters from iso-8859-15, so they're
probably not the best general-purpose arrangement.
This set of translations should probably be specified
by a resource string instead of being hardcoded at
compile time, but I couldn't work out how to do that.

Here's the patch (assuming Mozilla handles the file
upload better than lynx did), against 2.7.10. I've
hidden all the functionality away inside #ifdef's, so
that the option could be enabled by adding a suitable
option to the ./configure script.


  • Geoff Wing

    Geoff Wing - 2003-06-19
    • assigned_to: nobody --> gcw
    • status: open --> closed-accepted
  • Geoff Wing

    Geoff Wing - 2003-06-19

    Logged In: YES

    Accepted. Thank you. Patch applied to the CVS repository.
    I've slightly modified the formatting (and moved the define
    to feature.h) - and converted C++ comments to C comments.
    In future, this may also be done via a resource - as you've

  • Glyn Kennington

    Glyn Kennington - 2003-07-27

    Logged In: YES

    I've now added support for resources - resource acsChars should be set
    to the 32 characters required. The patch is against current CVS, and
    also changes the default characters so that they are entirely members
    of us-ascii.

    (I won't add anything to the configure script till I know more about
    autoconf. Same goes for including a description of the resource in the

  • Glyn Kennington

    Glyn Kennington - 2003-07-27

    support for specifying characters in resource string


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks