[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unicode character read representation
From: |
Kenichi Handa |
Subject: |
Re: Unicode character read representation |
Date: |
Fri, 27 Feb 2009 09:51:01 +0900 |
In article <address@hidden>, Stefan Monnier <address@hidden> writes:
> > For instance 0xFFFF is a valid Unicode code-point, but is
> > not a character. Should it be accepted or not?
> Yes, it should. But I think that \u3FFFFF shouldn't since it's not
> a valid unicode code point.
Ok, I've just installed this change.
Index: lread.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/lread.c,v
retrieving revision 1.403
retrieving revision 1.404
diff -u -r1.403 -r1.404
--- lread.c 25 Feb 2009 12:47:24 -0000 1.403
+++ lread.c 27 Feb 2009 00:48:03 -0000 1.404
@@ -2205,7 +2205,7 @@
/* A Unicode escape. We only permit them in strings and characters,
not arbitrarily in the source code, as in some other languages. */
{
- int i = 0;
+ unsigned int i = 0;
int count = 0;
while (++count <= unicode_hex_count)
@@ -2222,7 +2222,8 @@
break;
}
}
-
+ if (i > 0x10FFFF)
+ error ("Non-Unicode character: 0x%x", i);
return i;
}
---
Kenichi Handa
address@hidden