diff options
author | Munyoki Kilyungi | 2023-05-09 13:01:58 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-05-26 08:40:22 +0300 |
commit | 767343f7b53079118d62507a9549a8b17b72cbbd (patch) | |
tree | 40463e143571e8e0a751743ae9db96725726612b | |
parent | 6a193980dd83c235962a9a2adc127daa001036e3 (diff) | |
download | gn-transform-databases-767343f7b53079118d62507a9549a8b17b72cbbd.tar.gz |
Replace chars not allowed in RDF
* dump.scm (sanitize-rdf-string): New function
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-x | dump.scm | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -135,6 +135,14 @@ association list mapping substrings to their replacements." str replacement-alist)) +(define (sanitize-rdf-string str) + (replace-substrings + (string-trim-both str) + '(("\r" . "\\r") + ("\n" . "\\n") + ("\"" . "'") + ("\v" . "")))) + (define (snake->lower-camel str) (let ((char-list (string->list str))) (call-with-output-string |