[m-rev.] for review: add some unicode support to Mercury

Ian MacLarty maclarty at csse.unimelb.edu.au
Fri Jul 21 12:45:23 AEST 2006


On Fri, Jul 21, 2006 at 11:44:26AM +1000, Michael Day wrote:
> 
> On a related note, it is possible for strings in Mercury source files to
> contain unescaped UTF-8 text directly. However, what about allowing
> identifiers to also use unescaped UTF-8 text, such that for example lambda
> can be used as an identifier?
> 

In fact that seems to work already (as long as you quote the
identifier).  However I'm adding the escape sequences precisely so we
can avoid embedding unescaped unicode in source files.  In my experience
this is generally not a good idea since you then have to be very careful
to tell your tools what encoding is being used (whereas if you stick
with 7bit ascii then everything just works).

As an example have a look the expected output of the unicode test case
in my diff.  My email client doesn't render the utf-8 properly.  If I
open it in vim, then some of it is rendered properly (the accents on the
e's in resume work, but not pi).  If you open the file in firefox and
tell it to use UTF-8 then it works (assuming the encodings haven't been
screwed up by the mail transfer agents, which they probably have, since
I didn't set the encoding for that mail to utf-8).  Managing source code with
non-escaped unicode chars will be way more trouble than it's worth if
you ask me.

Ian.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at csse.unimelb.edu.au
administrative address: owner-mercury-reviews at csse.unimelb.edu.au
unsubscribe: Address: mercury-reviews-request at csse.unimelb.edu.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at csse.unimelb.edu.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list