Hi,<div><br> I can't figure out how to use the \U syntax to enter unicode strings. For example</div><div>from a former post about unicode:</div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<blockquote><br></blockquote>
MLton supports \Uxxxxxxxx escape sequences for describing characters with ordinal value greater than 2^16. (The SML Definition allows \uxxxx.)<br>
Note that the overload resolution depends on how the value is used, not the constant that defines it; so, you might need a WideString.string constraint.<br><br></blockquote><div><br></div><div>Say I want to enter the unicode forall (∀). The unicode hex value is E28880. If I translate this to the 8 bit escape sequence I can print it:</div>
<div><br></div><div>val _ = print "\226\136\128"</div><div><br></div><div>prints ∀</div><div><br></div><div>This conversion is a bit painful though. The unicode point value is \U2200, but I can't get MLton to compile either of these:</div>
<div><br></div><div><div>val _ = print "\U2200" </div></div><div>val _ = print (WideString.toString ("\U2200" : WideString.string)) </div><div><br></div><div>What am I doing wrong?</div><div><br></div>
<div>Thank you!</div><div><br></div><div>Sean</div><div><br></div><div><br></div><div><br></div><blockquote><br></blockquote></div></div>