{"id":1336,"date":"2020-04-07T11:13:31","date_gmt":"2020-04-07T05:43:31","guid":{"rendered":"https:\/\/www.huntbee.com\/resources\/?p=1336"},"modified":"2020-12-14T12:33:04","modified_gmt":"2020-12-14T07:03:04","slug":"passing-decoded-cyrillic-characters-in-json_encode","status":"publish","type":"post","link":"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/","title":{"rendered":"Passing decoded Cyrillic Characters in json_encode"},"content":{"rendered":"\n<p>To decode the encoded cyrillic characters like \\u041D in an array and to pass it to json_encode, follow the below technique<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">json_encode($array, JSON_UNESCAPED_UNICODE);<\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$json = defined('JSON_UNESCAPED_UNICODE') ? json_encode($array, JSON_UNESCAPED_UNICODE) : json_encode($str);<\/pre>\n\n\n\n<p>or if PHP 5.4 and below<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">preg_replace_callback('\/\\\\\\u([01-9a-fA-F]{4})\/', 'prepareUTF8', json_encode($array))<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To decode the encoded cyrillic characters like \\u041D in an array and to pass it to json_encode, follow the below technique json_encode($array, JSON_UNESCAPED_UNICODE); or $json = defined(&#8216;JSON_UNESCAPED_UNICODE&#8217;) ? json_encode($array, JSON_UNESCAPED_UNICODE) : json_encode($str); or if PHP 5.4 and below preg_replace_callback(&#8216;\/\\\\\\u([01-9a-fA-F]{4})\/&#8217;, &#8216;prepareUTF8&#8217;, json_encode($array))<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[19,21,20],"class_list":["post-1336","post","type-post","status-publish","format-standard","hentry","category-blogs","tag-cryillic","tag-decoding","tag-json_encode"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Passing decoded Cyrillic Characters in json_encode - HuntBee Resources<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Passing decoded Cyrillic Characters in json_encode - HuntBee Resources\" \/>\n<meta property=\"og:description\" content=\"To decode the encoded cyrillic characters like u041D in an array and to pass it to json_encode, follow the below technique json_encode($array, JSON_UNESCAPED_UNICODE); or $json = defined(&#039;JSON_UNESCAPED_UNICODE&#039;) ? json_encode($array, JSON_UNESCAPED_UNICODE) : json_encode($str); or if PHP 5.4 and below preg_replace_callback(&#039;\/\\u([01-9a-fA-F]{4})\/&#039;, &#039;prepareUTF8&#039;, json_encode($array))\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/\" \/>\n<meta property=\"og:site_name\" content=\"HuntBee Resources\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/huntbee.opencart\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-07T05:43:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-14T07:03:04+00:00\" \/>\n<meta name=\"author\" content=\"huntbee\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"huntbee\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/passing-decoded-cyrillic-characters-in-json_encode\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/passing-decoded-cyrillic-characters-in-json_encode\\\/\"},\"author\":{\"name\":\"huntbee\",\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/#\\\/schema\\\/person\\\/68d577bfe48ea287ea3f348a0524e09b\"},\"headline\":\"Passing decoded Cyrillic Characters in json_encode\",\"datePublished\":\"2020-04-07T05:43:31+00:00\",\"dateModified\":\"2020-12-14T07:03:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/passing-decoded-cyrillic-characters-in-json_encode\\\/\"},\"wordCount\":36,\"publisher\":{\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/#organization\"},\"keywords\":[\"cryillic\",\"decoding\",\"json_encode\"],\"articleSection\":[\"Blogs\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/passing-decoded-cyrillic-characters-in-json_encode\\\/\",\"url\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/passing-decoded-cyrillic-characters-in-json_encode\\\/\",\"name\":\"Passing decoded Cyrillic Characters in json_encode - HuntBee Resources\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/#website\"},\"datePublished\":\"2020-04-07T05:43:31+00:00\",\"dateModified\":\"2020-12-14T07:03:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/passing-decoded-cyrillic-characters-in-json_encode\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/passing-decoded-cyrillic-characters-in-json_encode\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/passing-decoded-cyrillic-characters-in-json_encode\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Passing decoded Cyrillic Characters in json_encode\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/#website\",\"url\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/\",\"name\":\"HuntBee Resources\",\"description\":\"OpenCart Extension Documentations - Guides - Blogs - Projects\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/#organization\",\"name\":\"HuntBee OpenCart\",\"url\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/cropped-mobile-logo-new.png\",\"contentUrl\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/cropped-mobile-logo-new.png\",\"width\":945,\"height\":200,\"caption\":\"HuntBee OpenCart\"},\"image\":{\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/huntbee.opencart\",\"https:\\\/\\\/www.instagram.com\\\/opencart.huntbee\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/#\\\/schema\\\/person\\\/68d577bfe48ea287ea3f348a0524e09b\",\"name\":\"huntbee\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/wp-content\\\/litespeed\\\/avatar\\\/7711938111021bdf63fffaf7394ff3b9.jpg?ver=1777045940\",\"url\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/wp-content\\\/litespeed\\\/avatar\\\/7711938111021bdf63fffaf7394ff3b9.jpg?ver=1777045940\",\"contentUrl\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/wp-content\\\/litespeed\\\/avatar\\\/7711938111021bdf63fffaf7394ff3b9.jpg?ver=1777045940\",\"caption\":\"huntbee\"},\"sameAs\":[\"https:\\\/\\\/www.huntbee.com\\\/\"],\"url\":\"https:\\\/\\\/www.huntbee.com\\\/resources\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Passing decoded Cyrillic Characters in json_encode - HuntBee Resources","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/","og_locale":"en_US","og_type":"article","og_title":"Passing decoded Cyrillic Characters in json_encode - HuntBee Resources","og_description":"To decode the encoded cyrillic characters like u041D in an array and to pass it to json_encode, follow the below technique json_encode($array, JSON_UNESCAPED_UNICODE); or $json = defined('JSON_UNESCAPED_UNICODE') ? json_encode($array, JSON_UNESCAPED_UNICODE) : json_encode($str); or if PHP 5.4 and below preg_replace_callback('\/\\u([01-9a-fA-F]{4})\/', 'prepareUTF8', json_encode($array))","og_url":"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/","og_site_name":"HuntBee Resources","article_publisher":"https:\/\/www.facebook.com\/huntbee.opencart","article_published_time":"2020-04-07T05:43:31+00:00","article_modified_time":"2020-12-14T07:03:04+00:00","author":"huntbee","twitter_card":"summary_large_image","twitter_misc":{"Written by":"huntbee"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/#article","isPartOf":{"@id":"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/"},"author":{"name":"huntbee","@id":"https:\/\/www.huntbee.com\/resources\/#\/schema\/person\/68d577bfe48ea287ea3f348a0524e09b"},"headline":"Passing decoded Cyrillic Characters in json_encode","datePublished":"2020-04-07T05:43:31+00:00","dateModified":"2020-12-14T07:03:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/"},"wordCount":36,"publisher":{"@id":"https:\/\/www.huntbee.com\/resources\/#organization"},"keywords":["cryillic","decoding","json_encode"],"articleSection":["Blogs"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/","url":"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/","name":"Passing decoded Cyrillic Characters in json_encode - HuntBee Resources","isPartOf":{"@id":"https:\/\/www.huntbee.com\/resources\/#website"},"datePublished":"2020-04-07T05:43:31+00:00","dateModified":"2020-12-14T07:03:04+00:00","breadcrumb":{"@id":"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.huntbee.com\/resources\/passing-decoded-cyrillic-characters-in-json_encode\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.huntbee.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Passing decoded Cyrillic Characters in json_encode"}]},{"@type":"WebSite","@id":"https:\/\/www.huntbee.com\/resources\/#website","url":"https:\/\/www.huntbee.com\/resources\/","name":"HuntBee Resources","description":"OpenCart Extension Documentations - Guides - Blogs - Projects","publisher":{"@id":"https:\/\/www.huntbee.com\/resources\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.huntbee.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.huntbee.com\/resources\/#organization","name":"HuntBee OpenCart","url":"https:\/\/www.huntbee.com\/resources\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.huntbee.com\/resources\/#\/schema\/logo\/image\/","url":"https:\/\/www.huntbee.com\/resources\/wp-content\/uploads\/2020\/04\/cropped-mobile-logo-new.png","contentUrl":"https:\/\/www.huntbee.com\/resources\/wp-content\/uploads\/2020\/04\/cropped-mobile-logo-new.png","width":945,"height":200,"caption":"HuntBee OpenCart"},"image":{"@id":"https:\/\/www.huntbee.com\/resources\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/huntbee.opencart","https:\/\/www.instagram.com\/opencart.huntbee\/"]},{"@type":"Person","@id":"https:\/\/www.huntbee.com\/resources\/#\/schema\/person\/68d577bfe48ea287ea3f348a0524e09b","name":"huntbee","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.huntbee.com\/resources\/wp-content\/litespeed\/avatar\/7711938111021bdf63fffaf7394ff3b9.jpg?ver=1777045940","url":"https:\/\/www.huntbee.com\/resources\/wp-content\/litespeed\/avatar\/7711938111021bdf63fffaf7394ff3b9.jpg?ver=1777045940","contentUrl":"https:\/\/www.huntbee.com\/resources\/wp-content\/litespeed\/avatar\/7711938111021bdf63fffaf7394ff3b9.jpg?ver=1777045940","caption":"huntbee"},"sameAs":["https:\/\/www.huntbee.com\/"],"url":"https:\/\/www.huntbee.com\/resources\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.huntbee.com\/resources\/wp-json\/wp\/v2\/posts\/1336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.huntbee.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.huntbee.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.huntbee.com\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.huntbee.com\/resources\/wp-json\/wp\/v2\/comments?post=1336"}],"version-history":[{"count":5,"href":"https:\/\/www.huntbee.com\/resources\/wp-json\/wp\/v2\/posts\/1336\/revisions"}],"predecessor-version":[{"id":1651,"href":"https:\/\/www.huntbee.com\/resources\/wp-json\/wp\/v2\/posts\/1336\/revisions\/1651"}],"wp:attachment":[{"href":"https:\/\/www.huntbee.com\/resources\/wp-json\/wp\/v2\/media?parent=1336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.huntbee.com\/resources\/wp-json\/wp\/v2\/categories?post=1336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.huntbee.com\/resources\/wp-json\/wp\/v2\/tags?post=1336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}