<div dir="ltr">Print going into a loop is not OK, I suppose Marc fixes that.<div><br></div><div>Needing a switch for switching on Unicode is OK though. When that option is off, you could do your prints by serializing to UTF8 binary yourself and then writing it byte by byte to the console.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-26 13:21 GMT+08:00 Vijay Mathew <span dir="ltr"><<a href="mailto:vijay.the.lisper@gmail.com" target="_blank">vijay.the.lisper@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Thanks Adam, will try what you suggested. But I really don't understand why a special switch is required to properly print Unicode characters. Even if the user is unaware of this, 'print' going into a loop is bad behavior.</p><span class="HOEnZb"><font color="#888888">
<p dir="ltr">--Vijay</p></font></span><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><div class="gmail_quote">On Jun 26, 2016 8:26 AM, "Adam" <<a href="mailto:adam.mlmb@gmail.com" target="_blank">adam.mlmb@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You need to switch on unicode output for the output medium (gsc -t8) and maybe also specify the maximum unicode character number that the writer will accept to write. Please report back when you figured.</div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-26 10:34 GMT+08:00 Vijay Mathew <span dir="ltr"><<a href="mailto:vijay.the.lisper@gmail.com" target="_blank">vijay.the.lisper@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">How can I make gambit to print a Unicode character's symbol (or glyph)?<div>For example, I want to display the U<font face="arial, helvetica, sans-serif">nicode infin</font>ity symbol <span style="color:rgb(76,76,76);font-family:AppleSDGothicNeo-Regular,"lucida grande",tahoma,verdana,arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol",NotoColorEmoji,EmojiSymbols,Symbola,Noto,"Android Emoji",AndroidEmoji,"Arial Unicode MS","Zapf Dingbats",AppleColorEmoji,"Apple Color Emoji";font-size:13px;line-height:20px;text-align:justify;text-indent:27px">∞ </span><span style="color:rgb(76,76,76);font-size:13px;line-height:20px;text-align:justify;text-indent:27px"><font face="arial, helvetica, sans-serif">(#\u221E).</font></span></div><div><span style="color:rgb(76,76,76);font-size:13px;line-height:20px;text-align:justify;text-indent:27px"><font face="arial, helvetica, sans-serif">Calling `(display #\u221E)` or `(print #\u221E)` throws the REPL into an infinite loop.</font></span></div><div><span style="color:rgb(76,76,76);font-size:13px;line-height:20px;text-align:justify;text-indent:27px"><font face="arial, helvetica, sans-serif">(This happens for most Unicode literals I tried, not just the infinity symbol :-))</font></span></div><div><span style="color:rgb(76,76,76);font-size:13px;line-height:20px;text-align:justify;text-indent:27px"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><span style="color:rgb(76,76,76);font-size:13px;line-height:20px;text-align:justify;text-indent:27px"><font face="arial, helvetica, sans-serif">       $ gsc<br>      </font></span><span style="font-size:13px;color:rgb(76,76,76);line-height:20px;text-align:justify;text-indent:27px"><font face="arial, helvetica, sans-serif"> </font></span><font color="#4c4c4c" face="arial, helvetica, sans-serif"><span style="line-height:20px">Gambit v4.8.4</span></font></div><div><font color="#4c4c4c" face="arial, helvetica, sans-serif"><span style="line-height:20px"><br></span></font></div><div><span style="text-align:justify;text-indent:27px;line-height:20px"><font color="#4c4c4c" face="arial, helvetica, sans-serif"><div>> (print #\u221E)</div><div>*** ERROR IN ##wr-ch -- Can't convert to C char-string</div><div>(write-char #\*** ERROR IN ##wr-ch -- Can't convert to C char-string</div><div>(write-char #\*** ERROR IN ##wr-ch -- Can't convert to C char-string</div><div>(write-char #\*** ERROR IN ##wr-ch -- Can't convert to C char-string</div><div>(write-char #\*** ERROR IN ##wr-ch -- Can't convert to C char-string</div><div><br></div><div>Thanks,<br></div><div><br></div><div>--- Vijay</div></font></span></div><div><span style="color:rgb(76,76,76);font-size:13px;line-height:20px;text-align:justify;text-indent:27px"><font face="arial, helvetica, sans-serif"><br></font></span></div></div>
<br>_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca" target="_blank">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" rel="noreferrer" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br></blockquote></div><br></div>
</blockquote></div></div>
</div></div></blockquote></div><br></div>