[gambit-list] Unicode silliness

C K Kashyap ckkashyap at gmail.com
Thu Jan 19 20:12:42 EST 2017


cool :)

On Thu, Jan 19, 2017 at 5:08 PM, Marc Feeley <feeley at iro.umontreal.ca>
wrote:

> Yes it “works”… but for the wrong reasons… try
>
> (pp 🍔)
>
> and you will see your code has no burger in it.  That’s because when you
> entered a burger at the terminal Gambit saw that as a 4 character symbol,
> i.e. |\360\237\215\224| .  To get a real burger (single Unicode character),
> you need the -:t8 .
>
> Marc
>
> > On Jan 19, 2017, at 8:02 PM, Bradley Lucier <lucier at math.purdue.edu>
> wrote:
> >
> >
> >> On Jan 19, 2017, at 7:57 PM, Marc Feeley <feeley at iro.umontreal.ca>
> wrote:
> >>
> >> If you try this, make sure you start gsi with the -:t8 flag so that the
> terminal input/output is UTF-8 encoded.  That way you can edit the lines
> more easily.
> >
> > Really?  This seems to work OK (in a Mac OS X Terminal window):
> >
> > [Media-Mac-mini-3:~] lucier% cat hamburger.scm
> > (define (🍔 x)
> >  (if (< x 2)
> >      1
> >      (+ (🍔 (- x 2))
> >         (🍔 (- x 1)))))
> > [Media-Mac-mini-3:~] lucier% emacs hamburger.scm
> > [Media-Mac-mini-3:~] lucier% gsi
> > Gambit v4.8.6
> >
> >> (load "hamburger")
> > "/Users/lucier/hamburger.scm"
> >> (🍔  6)
> > 13
> >> (🍔  7)
> > 21
> >> (🍔  8)
> > 34
> >>
> >
>
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20170119/1384d9b5/attachment.htm>


More information about the Gambit-list mailing list