B
B
brar2019-05-16 20:00:08
linux
brar, 2019-05-16 20:00:08

How to get readable Russian strings (instead of ASCII) in curl response?

curl -v -H "Content-Type: application/json" some_url

The response fields contain ACSII instead of Russian text (like \u0414\u0435\u0422).
Tried specifying other encodings in the request than my local utf-8, for example: Doesn't help.
-H "Content-Type: application/json; charset=koi-8"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2019-05-16
@brar

JSON text exchanged between systems that are not part of a closed ecosystem MUST be encoded using UTF-8

Try the ascii2uni utility
curl -v -H "Content-Type: application/json" some_url | ascii2uni -aU

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question