[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
UTF8 string storage and retrieval in XML
From: |
Richard Shann |
Subject: |
UTF8 string storage and retrieval in XML |
Date: |
Mon, 01 Feb 2016 15:05:38 +0000 |
Can anyone explain what is going on when you try to store strings with
non-ASCII characters? Here is an example:
guile> (define another-data "Čć")
guile> another-data
"�\x8c�\x87"
guile> (display another-data)
Čćguile>
I would expect evaluating another-data to give "Čć" not
"�\x8c�\x87" (what is that?)...
My problem comes with storing an association list with the second
element a string with a non-ASCII character in it. I'm storing the alist
as a string with
(format #f "'~s" myalist)
but when I try to store this string on disk using XML it barfs on
reloading.
Richard Shann
- UTF8 string storage and retrieval in XML,
Richard Shann <=