clojure string can not deal with unicode?

21 views
Skip to first unread message

vinurs

unread,
Jul 3, 2018, 9:05:00 AM7/3/18
to Luminus
In rest api, i have a string param in the form or body, but ios app send a string like '\U5176\U63a8\U5e7f'
and it seems that schema generate this message:
{
  "type": "json-parse-exception",
  "message": "Unrecognized character escape 'U' (code 85)\n at [Source: java.io.StringReader@3af85aec; line: 2, column: 16]"
}
i searched with google, but i can't find any solution



Dmitri

unread,
Jul 3, 2018, 9:54:25 AM7/3/18
to Luminus
You have to make sure you set the encoding explicitly. In general, it's good practice to use utf-8 for client/server communication though
https://www.w3.org/International/questions/qa-choosing-encodings
Reply all
Reply to author
Forward
0 new messages