Krzysztof Wolny Krzysztof Wolny - 7 months ago 58
JSON Question

How to convert \uXXXX unicode to UTF-8 using console tools in *nix

I use

to get some URL response, it's JSON response and it contains unicode-escaped national characters like
\u0144 (ń)
\u00f3 (ó)

How can I convert them to UTF-8 or any other encoding to save into file?


I found native2ascii from JDK as the best way to do it:

native2ascii -encoding UTF-8 -reverse src.txt dest.txt

Detailed description is here: