Skip to content

Commit f06959c

Browse files
committed
REDCAP: Make redcap:data->string deal with unicode characters
1 parent bcc7913 commit f06959c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/redcap/redcap.scm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#|
22
LambdaNative - a cross-platform Scheme framework
3-
Copyright (c) 2009-2013, University of British Columbia
3+
Copyright (c) 2009-2020, University of British Columbia
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or
@@ -51,7 +51,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5151
(u8vector-shrink! redcap:data 0))
5252

5353
(define (redcap:data->string)
54-
(let ((str (u8vector->string (subu8vector redcap:data 0 redcap:datalen))))
54+
(let ((str (u8vector->utf8string (subu8vector redcap:data 0 redcap:datalen))))
5555
(redcap:data-clear!)
5656
str))
5757

@@ -811,7 +811,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
811811
(string=? (substring (car fileout) 9 12) "200")))
812812
fileout
813813
;; Display and log the REDCap error message, but return the error message as a string
814-
(let ((message (u8vector->string (cadr fileout))))
814+
(let ((message (u8vector->utf8string (cadr fileout))))
815815
(log-error "REDCap:" message)
816816
message)
817817
))

0 commit comments

Comments
 (0)