mescc: support \x00 strings in M1.
* module/mes/M1.mes (object->m1): Support \x00 strings.
This commit is contained in:
parent
ec3c031b2f
commit
3f188d7268
|
@ -150,7 +150,8 @@
|
||||||
(cond ((and (< len string-max)
|
(cond ((and (< len string-max)
|
||||||
(char? (car data))
|
(char? (car data))
|
||||||
(eq? (last data) #\nul)
|
(eq? (last data) #\nul)
|
||||||
(not (find (cut memq <> '(#\nul #\backspace #\return #\" #\')) (list-head data (1- (length data))))))
|
(not (find (cut memq <> '(#\nul #\backspace #\return #\" #\')) (list-head data (1- (length data)))))
|
||||||
|
(not (any (lambda (ch) (>= (char->integer ch) #x80)) data)))
|
||||||
(format #t "\"~a\"" (list->string (list-head data (1- (length data))))))
|
(format #t "\"~a\"" (list->string (list-head data (1- (length data))))))
|
||||||
(else (format #t "~a" (string-join (map text->M1 data) " "))))
|
(else (format #t "~a" (string-join (map text->M1 data) " "))))
|
||||||
(newline)))
|
(newline)))
|
||||||
|
|
Loading…
Reference in a new issue