bug when `stringifying` exponent markers
Closed this issue · 5 comments
jsulmont commented
Hi
Firstly thank you for this library!
There is probably a bug when stringifying floats with (any) exponent markers:
(jzon:stringify 1.0d0) ;; => "�^@.0"
(jzon:stringify 12.0d0)) ;; => "�^@1.0"
(jzon:stringify 123456.0s0) ;; => "^@12345.0"
;;
I'll try to come up with a PR; but in the meantime, would appreciate if anyone has an idea.
Thank you!!
Zulu-Inuoe commented
This is very odd and looks like some kid of encoding issue.. Can I ask for details on where you're running this? OS and version information?
Also the version of SBCL
jsulmont commented
@Zulu-Inuoe Yes sorry. I am using the latest SBCL (2.3.4) on MacOS silicon
Zulu-Inuoe commented
Okay. Could you share the output at the repl when you eval (map 'list #'char-code "e+-.0123456789")
? It might be that the encoding differs for some reason.
jsulmont commented
Here:
* (map 'list #'char-code "e+-.0123456789")
(101 43 45 46 48 49 50 51 52 53 54 55 56 57)
Zulu-Inuoe commented