I have a string example that I get from json (CP1251): means: This tool says that I have to use CP1252 → CP1251 decoder. I try this much: but it did not resolve my problem. . How can i do wrong How can I change my Jason Cyrillic string in ROR normally? I get Jasonson from the URL: After that, text "itemprop =" text ">
Ôèëüòð Ìàñëííûé OPEL / GM / DAUOO
Filter M / s Opel / GM / Demo
my_string.force_encoding ('cp1252') force_encoding ('1251')
jsonAE = JSON.load (open ('http: //*****/portal.apil = * **** & P = Sih2 ***** & amp; function = price_by_nr_firm & NR = 'From Json I:
{"Result": [ "" "": "" "" "" "" "" ":" "" "" "" "" "" ":" "" "": "" "" "" "" "" "" "" "": "" "" " Knecht "," name ":" Фильтр opal / GM / Daewoo масляный "," share ":" - "," distribution ":" не известно "," minq ":" 1 "," upd ":" 17.03.15 00:05 "," value ":" 130.34 "," currency ":" руб. "}]}
.encode ▶ put 'opal after
JSON.load
No comments:
Post a Comment