# How to use 8-bit ascii in MOO ?

Michael Moore (mike@mail.datasys.net)
Thu, 5 Dec 1996 13:42:05 PST

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    Heikki J Wilenius wrote:
    >
    >         Hi,
    >
    > I can't output any 8-bit ascii characters in the MOO. For example, when
    > I do the following command:
    >
    > ;"a";  (the character inside the quotes being an a with dots, ascii 132)
    >
    > the output is
    >
    > => ""
    >
    > Any fix for this requiring not to edit the sources? Or if I have to
    > do that, any tips where to start looking?
    >
    >         Thanks,
    >                 Heikki

    Here's code that switches a connection into binary mode, outputs ASCII 132,
    followed by a carriage return and a linefeed.

    #2:output132   none none none
     1:  set_connection_option(this, "binary", 1);
     2:  notify(this, "~84~0D~0A");
     3:  set_connection_option(this, "binary", 0);

    You can read more on this in the LambdaMOO programmer manual.  Look for
    "binary strings" and set_connection_option().

    Also, keep in mind that how a high-ASCII character is displayed is up to
    your MUD client.  Mine was nice and gave me the dotted 'a'.  If your
    client is Windows-based, what you get in the high-ASCII series depends
    on the font you've chosen.  In other words, high-ASCII characters are not
    standard.