Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to encode unicode characters #45

Open
eugeneia opened this issue Feb 3, 2017 · 1 comment
Open

Fails to encode unicode characters #45

eugeneia opened this issue Feb 3, 2017 · 1 comment

Comments

@eugeneia
Copy link

eugeneia commented Feb 3, 2017

To reproduce:

(jonathan:to-json "λ" :octets t)

The value 955 is not of the expected type (UNSIGNED-BYTE 8).
   [Condition of type TYPE-ERROR]

Version: #<SYSTEM jonathan / jonathan-20170124-git / quicklisp 2017-01-24>

@eugeneia
Copy link
Author

eugeneia commented Feb 3, 2017

The issue is that you are using char-code to write characters as octets, which you shouldn't do, for multiple reasons:

  1. one character does not equal one octet
  2. the result of char-code is implementation dependent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant