summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-04-02 20:35:13 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-02 20:35:13 +0000
commit872c91ae155f6880f8bf2b15c143bda5279a5794 (patch)
tree663505dbece632b3e75b0158fb36720c2d54829f /utf8.h
parentb929be1d26aeff4c8c3d4bbd655731a23247ecc8 (diff)
downloadperl-872c91ae155f6880f8bf2b15c143bda5279a5794.tar.gz
What started as a small nit (the charnames test, nit found
be Hugo), ballooned a bit... the goal is Larry's wish that illegal Unicode (such as U+FFFF) by default doesn't warn, since what if somebody WANTS to create illegal Unicode? Now getting close to this in the regex runtime. (Also, fix more of my fixation that BOM would be U+FFFE.) p4raw-id: //depot/perl@15689
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/utf8.h b/utf8.h
index a5312ca19e..3787832f81 100644
--- a/utf8.h
+++ b/utf8.h
@@ -188,24 +188,24 @@ encoded character.
#define UNICODE_SURROGATE_FIRST 0xd800
#define UNICODE_SURROGATE_LAST 0xdfff
#define UNICODE_REPLACEMENT 0xfffd
-#define UNICODE_BYTER_ORDER_MARK 0xfffe
+#define UNICODE_BYTE_ORDER_MARK 0xfeff
#define UNICODE_ILLEGAL 0xffff
/* Though our UTF-8 encoding can go beyond this,
- * let's be conservative. */
+ * let's be conservative and do as Unicode 3.2 says. */
#define PERL_UNICODE_MAX 0x10FFFF
#define UNICODE_ALLOW_SURROGATE 0x0001 /* Allow UTF-16 surrogates (EVIL) */
#define UNICODE_ALLOW_FDD0 0x0002 /* Allow the U+FDD0...U+FDEF */
-#define UNICODE_ALLOW_FFFE 0x0004 /* Allow 0xFFFE, 0x1FFFE, ... */
-#define UNICODE_ALLOW_FFFF 0x0008 /* Allow 0xFFFE, 0x1FFFE, ... */
+#define UNICODE_ALLOW_BOM 0x0004 /* Allow 0xFEFF */
+#define UNICODE_ALLOW_FFFF 0x0008 /* Allow 0xFFFF, 0x1FFFF, ... */
#define UNICODE_ALLOW_SUPER 0x0010 /* Allow past 10xFFFF */
#define UNICODE_ALLOW_ANY 0xFFFF
#define UNICODE_IS_SURROGATE(c) ((c) >= UNICODE_SURROGATE_FIRST && \
(c) <= UNICODE_SURROGATE_LAST)
#define UNICODE_IS_REPLACEMENT(c) ((c) == UNICODE_REPLACEMENT)
-#define UNICODE_IS_BYTE_ORDER_MARK(c) ((c) == UNICODE_BYTER_ORDER_MARK)
+#define UNICODE_IS_BYTE_ORDER_MARK(c) ((c) == UNICODE_BYTE_ORDER_MARK)
#define UNICODE_IS_ILLEGAL(c) ((c) == UNICODE_ILLEGAL)
#ifdef HAS_QUAD