I've a CSV file containing sites along with addresses. I need to work on this file to produce a json file that I will use in Django to load initial data to my database. To do that, I need to convert all special characters from the CSV file to unicode escaped characters.
Here is an example:
Örnsköldsvik;SE;Ornskoldsvik;Ångermanlandsgatan 28 A
It should be converted to:
\u00D6rnsk\u00F6ldsvik;SE;Ornskoldsvik;\u00C5ngermanlandsgatan 28 A
The following site is doing exactly the conversion I'm expecting: http://itpro.cz/juniconv/ but I'de like to find a way to do it from command line (bash) or in python. I've already tried using iconv
, uconv
and some python scripts without real success.
What kind of script is running behind the juniconv
website?
Thank you in avance for any suggestion.