diff options
author | David Robillard <d@drobilla.net> | 2013-03-30 01:42:00 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-03-30 01:42:00 +0000 |
commit | 2d6b2c5560ec27e61b2cfdbb50b91b1e96d04ed0 (patch) | |
tree | 58c74f129e41275c7937fb834962f2f8da46f4ce /src | |
parent | 0c9f5eb2eeb4927e51f43ac2cba85cebca873234 (diff) | |
download | serd-2d6b2c5560ec27e61b2cfdbb50b91b1e96d04ed0.tar.gz serd-2d6b2c5560ec27e61b2cfdbb50b91b1e96d04ed0.tar.bz2 serd-2d6b2c5560ec27e61b2cfdbb50b91b1e96d04ed0.zip |
Don't escape backspace or form feed for ntriples.
git-svn-id: http://svn.drobilla.net/serd/trunk@440 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src')
-rw-r--r-- | src/writer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/writer.c b/src/writer.c index 83ad6e20..5b896f94 100644 --- a/src/writer.c +++ b/src/writer.c @@ -305,11 +305,15 @@ write_text(SerdWriter* writer, TextContext ctx, case '\n': len += sink("\\n", 2, writer); continue; case '\r': len += sink("\\r", 2, writer); continue; case '\t': len += sink("\\t", 2, writer); continue; - case '\b': len += sink("\\b", 2, writer); continue; - case '\f': len += sink("\\f", 2, writer); continue; case '"': len += sink("\\\"", 2, writer); continue; default: break; } + if (writer->syntax != SERD_NTRIPLES) { + switch (in) { + case '\b': len += sink("\\b", 2, writer); continue; + case '\f': len += sink("\\f", 2, writer); continue; + } + } } size_t size = 0; |