diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-02 20:35:13 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-02 20:35:13 +0000 |
commit | e21356ab100595b3ddf222740e6f66ff22553b60 (patch) | |
tree | 663505dbece632b3e75b0158fb36720c2d54829f /utf8.h | |
parent | 8e12f00f929fa0d3f53b510ab7c77b437aa5cca6 (diff) | |
download | perl-e21356ab100595b3ddf222740e6f66ff22553b60.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.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |