Oh actually... maybe it didn't :/ It works the first time you print it out (directly) ... but then when saved to the DB, it gets corrupt (even though the DB is in utf_bin)
Any other ideas? Who would have thought this would be such a royal PITA! I wish we just all moved over to one charset ;)
Here is what a dumper of the values looks like:
$VAR1 = {
'title_flag' => 0,
'og_desc' => "\x{420}\x{443}\x{43c}\x{44b}\x{43d}\x{438}\x{4
+4f} \x{43d}\x{435} \x{441}\x{43c}\x{43e}\x{436}\x{435}\x{442} \x{43f}
+\x{43e}\x{43a}\x{430}\x{437}\x{44b}\x{432}\x{430}\x{442}\x{44c} \x{44
+2}\x{435}\x{43b}\x{435}\x{432}\x{438}\x{437}\x{438}\x{43e}\x{43d}\x{4
+3d}\x{44b}\x{439} \x{43a}\x{43e}\x{43d}\x{43a}\x{443}\x{440}\x{441} \
+x{ab}\x{415}\x{432}\x{440}\x{43e}\x{432}\x{438}\x{434}\x{435}\x{43d}\
+x{438}\x{435}-2016\x{bb}, \x{43f}\x{435}\x{432}\x{435}\x{446} \x{41e}
+\x{432}\x{438}\x{434}\x{438}\x{443} \x{410}\x{43d}\x{442}\x{43e}\x{43
+d} \x{43d}\x{435} \x{432}\x{44b}\x{441}\x{442}\x{443}\x{43f}\x{438}\x
+{442} \x{432} \x{421}\x{442}\x{43e}\x{43a}\x{433}\x{43e}\x{43b}\x{44c
+}\x{43c}\x{435}, \x{430} \x{440}\x{443}\x{43c}\x{44b}\x{43d}\x{441}\x
+{43a}\x{438}\x{435} \x{442}\x{435}\x{43b}\x{435}\x{437}\x{440}\x{438}
+\x{442}\x{435}\x{43b}\x{438} \x{43d}\x{435} \x{441}\x{43c}\x{43e}\x{4
+33}\x{443}\x{442} \x{43f}\x{440}\x{43e}\x{433}\x{43e}\x{43b}\x{43e}\x
+{441}\x{43e}\x{432}\x{430}\x{442}\x{44c} \x{437}\x{430} \x{43f}\x{43e
+}\x{43d}\x{440}\x{430}\x{432}\x{438}\x{432}\x{448}\x{438}\x{445}\x{44
+1}\x{44f} \x{43c}\x{443}\x{437}\x{44b}\x{43a}\x{430}\x{43d}\x{442}\x{
+43e}\x{432} \x{2014} \x{438}\x{437}-\x{437}\x{430} \x{434}\x{43e}\x{4
+3b}\x{433}\x{430} \x{432} 16 \x{43c}\x{43b}\x{43d} \x{448}\x{432}\x{4
+35}\x{439}\x{446}\x{430}\x{440}\x{441}\x{43a}\x{438}\x{445} \x{444}\x
+{440}\x{430}\x{43d}\x{43a}\x{43e}\x{432}.",
'title' => " \x{420}\x{443}\x{43c}\x{44b}\x{43d}\x{438}\x{44
+f} \x{43d}\x{435} \x{431}\x{443}\x{434}\x{435}\x{442} \x{443}\x{447}\
+x{430}\x{441}\x{442}\x{432}\x{43e}\x{432}\x{430}\x{442}\x{44c} \x{432
+} \x{ab}\x{415}\x{432}\x{440}\x{43e}\x{432}\x{438}\x{434}\x{435}\x{43
+d}\x{438}\x{438}-2016\x{bb} \x{438}\x{437}-\x{437}\x{430} \x{434}\x{4
+35}\x{43d}\x{435}\x{433} - \x{413}\x{430}\x{437}\x{435}\x{442}\x{430}
+.Ru ",
'charset' => 'windows-1251',
'og_image' => ' http://img.gazeta.ru/files3/123/8192123/rumi
+n-pic905-895x505-99564.jpg',
'description' => "\x{420}\x{443}\x{43c}\x{44b}\x{43d}\x{438}
+\x{44f} \x{43d}\x{435} \x{441}\x{43c}\x{43e}\x{436}\x{435}\x{442} \x{
+43f}\x{43e}\x{43a}\x{430}\x{437}\x{44b}\x{432}\x{430}\x{442}\x{44c} \
+x{442}\x{435}\x{43b}\x{435}\x{432}\x{438}\x{437}\x{438}\x{43e}\x{43d}
+\x{43d}\x{44b}\x{439} \x{43a}\x{43e}\x{43d}\x{43a}\x{443}\x{440}\x{44
+1} \x{ab}\x{415}\x{432}\x{440}\x{43e}\x{432}\x{438}\x{434}\x{435}\x{4
+3d}\x{438}\x{435}-2016\x{bb}, \x{43f}\x{435}\x{432}\x{435}\x{446} \x{
+41e}\x{432}\x{438}\x{434}\x{438}\x{443} \x{410}\x{43d}\x{442}\x{43e}\
+x{43d} \x{43d}\x{435} \x{432}\x{44b}\x{441}\x{442}\x{443}\x{43f}\x{43
+8}\x{442} \x{432} \x{421}\x{442}\x{43e}\x{43a}\x{433}\x{43e}\x{43b}\x
+{44c}\x{43c}\x{435}, \x{430} \x{440}\x{443}\x{43c}\x{44b}\x{43d}\x{44
+1}\x{43a}\x{438}\x{435} \x{442}\x{435}\x{43b}\x{435}\x{437}\x{440}\x{
+438}\x{442}\x{435}\x{43b}\x{438} \x{43d}\x{435} \x{441}\x{43c}\x{43e}
+\x{433}\x{443}\x{442} \x{43f}\x{440}\x{43e}\x{433}\x{43e}\x{43b}\x{43
+e}\x{441}\x{43e}\x{432}\x{430}\x{442}\x{44c} \x{437}\x{430} \x{43f}\x
+{43e}\x{43d}\x{440}\x{430}\x{432}\x{438}\x{432}\x{448}\x{438}\x{445}\
+x{441}\x{44f} \x{43c}\x{443}\x{437}\x{44b}\x{43a}\x{430}\x{43d}\x{442
+}\x{43e}\x{432} \x{2014} \x{438}\x{437}-\x{437}\x{430} \x{434}\x{43e}
+\x{43b}\x{433}\x{430} \x{432} 16 \x{43c}\x{43b}\x{43d} \x{448}\x{432}
+\x{435}\x{439}\x{446}\x{430}\x{440}\x{441}\x{43a}\x{438}\x{445} \x{44
+4}\x{440}\x{430}\x{43d}\x{43a}\x{43e}\x{432}."
};
...and here is the outputted JSON:
{"page_title":" Румыния не будет участвовать в Евровидении-2016 из-за денег - Газета.Ru ","description":"Румыния не сможет показывать телевизионный конкурс Евровидение-2016, певец Овидиу Антон не выступит в Стокгольме, а румынские телезрители не смогут проголосовать за понравившихся музыкантов из-за долга в 16 млн швейцарских франков."}
..yet here is what comes back out:
$VAR1 = {
'images' => '',
'all_images' => '{"image_loop":["http://static.gazeta.ru/nm2
+012/i/quotes/finam_head.png","/nm2015//gzt/img/logo.png"," http://img
+.gazeta.ru/files3/123/8192123/rumin-pic905-895x505-99564.jpg"," http:
+//img.gazeta.ru/files3/885/8195885/igra-pic265-265x150-77294.jpg"," h
+ttp://img.gazeta.ru/files3/725/7953725/RIAN_02710972.HR.ru-pic410-410
+x230-99945.jpg"," http://img.gazeta.ru/files3/331/8116331/2016-02-22T
+104304Z_1519170817_D1AESOMBZKAD_RTRMADP_3_UKRAINE-TATARS-EUROVISION-p
+ic410-410x230-5670.jpg","http://static.smi2.net/srcimg/2780020.png","
+/nm2015/gzt/img/logo_footer.png","http://static.gazeta.ru/nm2012/i/re
+uters_a2.png","http://static.gazeta.ru/nm2012/i/prime_a2.png","http:/
+/static.gazeta.ru/nm2012/i/interfax_a2.png","http://static.gazeta.ru/
+nm2012/i/ria_a2.png","http://static.gazeta.ru/nm2012/i/it_a3.png","ht
+tp://static.gazeta.ru/nm2012/i/lj_a2.png"," http://img.gazeta.ru/file
+s3/123/8192123/rumin-pic905-895x505-99564.jpg"]}',
'url' => 'www.gazeta.ru/culture/2016/04/22/a_8191769.shtml',
'title' => ' ƒм‹ния не бƒде
+30; ƒ‡ас‚вова‚Œ в «•в&#
+128;овидении-2016» из-за денег - “азе
+0;а.Ru ',
'description' => ' ƒм‹ния не сможе&
+#130; показ‹ва‚Œ ‚елевизионн
+‹й конкƒ€с «•в€овидение
+-2016», певе† žвидиƒ Ан‚он не
+в‹с‚ƒпи‚ в С‚окголŒм
+, а €ƒм‹нские ‚елез€и
+0;ели не смогƒ‚ п€оголосова
+0;Œ за пон€авивˆи…ся мƒз
+‹кан‚ов €” из-за долга в 16 мл
+н ˆвей†а€ски… „€анко
+.',
'grab_id' => '133'
};
{"page_title":" ƒм‹ния не бƒде‚ &#
+131;‡ас‚вова‚Œ в «•в€о
+идении-2016» из-за денег - “азе‚а.Ru
+ ","description":" ƒм‹ния не сможе‚ п
+каз‹ва‚Œ ‚елевизионн‹й
+ конкƒ€с «•в€овидение-2016»,
+певе† žвидиƒ Ан‚он не в‹
+с‚ƒпи‚ в С‚окголŒме, а &#
+128;ƒм‹нские ‚елез€и‚ели
+не смогƒ‚ п€оголосова‚Œ
+ за пон€авивˆи…ся мƒз‹к
+н‚ов €” из-за долга в 16 млн ˆ
+;вей†а€ски… „€анков.","cach
+ed":1}
Cheers
Andy |