The next problem is that printing of Unicode symbol names does not
work correctly. You can see this by trying:

(format nil "~A" (read-from-string "абракадабра"))

I do not understand enough about ECL's printing code yet to figure
out which part of the symbol printing code is doing the wrong thing,
and what the fix would be. I appreciate any help.

Attached are two test cases where this issue surfaces, that build on
the previous patches.

--
Vladimir Sedach
Software engineering services in Los Angeles https://oneofus.la

>From 63f4a568b63ae259f25f6b67643c1c958a5656f4 Mon Sep 17 00:00:00 2001
From: Vladimir Sedach <v...@oneofus.la>
Date: Sun, 3 May 2020 23:36:19 -0700
Subject: [PATCH] tests: Added tests showing error in printing Unicode symbol
 names

---
 src/tests/normal-tests/unicode.lsp | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/src/tests/normal-tests/unicode.lsp b/src/tests/normal-tests/unicode.lsp
index a3297679..6a4bc887 100644
--- a/src/tests/normal-tests/unicode.lsp
+++ b/src/tests/normal-tests/unicode.lsp
@@ -40,3 +40,30 @@
   (is (equal
        "ДАННЫЕ"
        (pathname-name (pathname "/tmp/данные.txt") :case :common))))
+
+;;; Date: 2020-05-03
+;;; From: Vladimir Sedach <v...@oneofus.la>
+;;; Fixed: 2020-05-03 (Vladimir Sedach)
+;;; Description:
+;;;
+;;;     Symbol names that contain Unicode are not printed correctly
+;;;
+(test unicode.0003.print-unicode-symbols
+  (is (string-equal
+       "АБРАКАДАБРА"
+       (format nil "~A" (read-from-string "абракадабра")))))
+
+;;; Date: 2020-05-03
+;;; From: Vladimir Sedach <v...@oneofus.la>
+;;; Fixed: 2020-05-03 (Vladimir Sedach)
+;;; Description:
+;;;
+;;;     unicode.0003.print-unicode-symbols shows up as a compiler
+;;;     error for symbol names that contain char codes between 128
+;;;     and 255, possibly others
+;;;
+(test unicode.0004.compile-unicode-symbols
+  (with-compiler ("unicode.0004.lsp" :load t)
+    "(defun unicode.0004 (x¹ y²)
+       (+ x¹ y²))")
+  (is (= 7 (unicode.0004 5 2))))
-- 
2.20.1

Reply via email to