aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-05-29 14:30:17 +0300
committerBonfaceKilz2023-05-30 11:51:30 +0300
commitdfa7af5f422ea90f88025754e7f013ab3c6f8306 (patch)
treea226c260698472c9f366753548e5961a1220da67
parent82f805c5b4f67a93cf973b2a72555f4214f90b1c (diff)
downloadgn-transform-databases-dfa7af5f422ea90f88025754e7f013ab3c6f8306.tar.gz
Fix broken utf-8 strings in abstract field
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-xexamples/dump-publication.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/dump-publication.scm b/examples/dump-publication.scm
index bed957a..b0b35b6 100755
--- a/examples/dump-publication.scm
+++ b/examples/dump-publication.scm
@@ -55,7 +55,8 @@
;; separated list. Split it.
(map string-trim (string-split (sanitize-rdf-string (field Publication Authors)) #\,)))
(set gn:abstract
- (sanitize-rdf-string (field Publication Abstract)))))
+ (sanitize-rdf-string
+ (field ("CAST(CONVERT(BINARY CONVERT(Publication.Abstract USING latin1) USING utf8) AS VARCHAR(100))" Abstract))))))