aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-24 23:59:03 +0000
committerDavid Robillard <d@drobilla.net>2011-01-24 23:59:03 +0000
commit634b5459db03b4cd00539ec45b6a3b23f29481de (patch)
tree579989276635d6b37a3e0e9c100143c7be2340ac /src/reader.c
parente4daedb841acef2a4839a33e7c17ee8ea5fa6913 (diff)
downloadserd-634b5459db03b4cd00539ec45b6a3b23f29481de.tar.gz
serd-634b5459db03b4cd00539ec45b6a3b23f29481de.tar.bz2
serd-634b5459db03b4cd00539ec45b6a3b23f29481de.zip
Remove support for 5 and 6 byte UTF-8 characters.
The UTF-8 spec supports this, but I can't even find real characters to test it with. There don't seem to be actual Unicode code points this high yet. If it can't be tested, it can't be useful. Gone. git-svn-id: http://svn.drobilla.net/serd/trunk@55 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/reader.c b/src/reader.c
index 773dd99b..3a4ef452 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -349,10 +349,6 @@ read_hex_escape(SerdReader reader, unsigned length, Ref dest)
size = 3;
} else if (c < 0x00200000) {
size = 4;
- } else if (c < 0x04000000) {
- size = 5;
- } else if (c < 0x80000000) {
- size = 6;
} else {
return false;
}
@@ -360,14 +356,6 @@ read_hex_escape(SerdReader reader, unsigned length, Ref dest)
// Build output in buf
// (Note # of bytes = # of leading 1 bits in first byte)
switch (size) {
- case 6:
- buf[5] = 0x80 | (uint8_t)(c & 0x3F);
- c >>= 6;
- c |= (4 << 24); // set bit 2
- case 5:
- buf[4] = 0x80 | (uint8_t)(c & 0x3F);
- c >>= 6;
- c |= (8 << 18); // set bit 3
case 4:
buf[3] = 0x80 | (uint8_t)(c & 0x3F);
c >>= 6;
@@ -488,10 +476,6 @@ read_character(SerdReader reader, Ref dest)
size = 3;
} else if ((c & 0xF8) == 0xF0) { // Starts with `11110'
size = 4;
- } else if ((c & 0xFC) == 0xF8) { // Starts with `111110'
- size = 5;
- } else if ((c & 0xFE) == 0xFC) { // Starts with `1111110'
- size = 6;
} else {
error(reader, "invalid character\n");
return SERD_ERROR;