{"id":11207,"date":"2014-06-11T10:22:36","date_gmt":"2014-06-11T10:22:36","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=11207"},"modified":"2014-06-11T10:24:22","modified_gmt":"2014-06-11T10:24:22","slug":"special-characters-problem","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/special-characters-problem\/","title":{"rendered":"Special Characters Problem (Displaying &#8216;???&#8217;)"},"content":{"rendered":"<p>Special characters are important to our web. We used them in different ways but\u00a0If our webpage is not supporting <strong>Special characters<\/strong> or showing <strong>????<\/strong> instead of &#8216; <span style=\"color: #777777;\">\u200e<strong>\u4e2d\u570b\u54f2\u5b78\u66f8\u96fb\u5b50\u5316\u8a08\u5283<\/strong><\/span><strong>\u00a0<\/strong>&#8216; or &#8216;\u00a0<span style=\"color: #545454;\"><strong>\u05d1\u05b0\u05bc\u05e8\u05b5\u05d0\u05e9\u05b4\u05c1\u0596\u05d9\u05ea \u05d1\u05b8\u05bc\u05e8\u05b8\u05a3\u05d0 \u05d0\u05b1\u05dc\u05b9\u05d4\u05b4\u0591\u05d9\u05dd \u05d0\u05b5\u05a5\u05ea \u05d4\u05b7\u05e9\u05b8\u05bc\u05c1\u05de\u05b7\u0596\u05d9\u05b4\u05dd<\/strong> &#8216;\u00a0<\/span>then it&#8217;s mean our controller \/ database is not properly working with these type of texts.<\/p>\n<p><strong>Reason can be behind this condition &#8211;<\/strong><\/p>\n<p>One reason &#8211;\u00a0your database table \/ column collation is not correct like not UTF-8 or others those one support special chars.<\/p>\n<p><strong>How to solve this issue &#8211;\u00a0<\/strong><\/p>\n<p>You can use\u00a0utf8_encode function which will convert your special characters to utf8 encoding data and then save it in your database and again use\u00a0utf8_decode function to get special data back.<\/p>\n<p>Or just change your table or column collation type<\/p>\n<pre class=\"brush:php\">$special_char = '\u4e2d\u570b\u54f2\u5b78\u66f8\u96fb\u5b50\u5316\u8a08\u5283';\r\n\r\n\/\/ just use this \r\n$special_char = utf8_encode($special_char);\r\n\r\n\/\/ then insert it into db (use your query type)\r\nmysql_query(\"INSERT INTO `TABLE_NAME` SET special_char = '\".$special_char.\"'\");\r\n\r\n\/\/ Opencart\r\n$this-&gt;db-&gt;query(\"INSERT INTO `\".DB_PREFIX.\"TABLE_NAME` SET special_char = '\".$special_char.\"'\");\r\n\r\n\/\/ And when you fetch data then just use opposite of utf8_encode\r\n\/\/ like your result in $special_char_result\r\n$special_char_result = utf8_decode($special_char_result);\r\n\r\n\/\/ this variable will display special char. text not  ????\r\n\r\n\/\/ or another simple solution for this situation is just change the collation type of table or that particular column\r\n\/\/ just run this query\r\nmysql_query(\"alter table `TABLE_NAME` convert to character set utf8 collate utf8_unicode_ci\");\r\n\r\n\/\/ Opencart\r\n$this-&gt;db-&gt;query(\"alter table `\" . DB_PREFIX . \"TABLE_NAME` convert to character set utf8 collate utf8_unicode_ci\");\r\n\r\n\/\/ From now on just add any special chars in db and retrieve without '????' fear.<\/pre>\n<p>That`s it !!! I hope it will help someone. \ud83d\ude42 [stextbox id=&#8221;info&#8221;]Your opinions, comments and suggestions are important to keep the page updated and interesting.\u00a0[\/stextbox]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Special characters are important to our web. We used them in different ways but\u00a0If our webpage is not supporting Special characters or showing ???? instead of &#8216; \u200e\u4e2d\u570b\u54f2\u5b78\u66f8\u96fb\u5b50\u5316\u8a08\u5283\u00a0&#8216; or &#8216;\u00a0\u05d1\u05b0\u05bc\u05e8\u05b5\u05d0\u05e9\u05b4\u05c1\u0596\u05d9\u05ea \u05d1\u05b8\u05bc\u05e8\u05b8\u05a3\u05d0 \u05d0\u05b1\u05dc\u05b9\u05d4\u05b4\u0591\u05d9\u05dd \u05d0\u05b5\u05a5\u05ea \u05d4\u05b7\u05e9\u05b8\u05bc\u05c1\u05de\u05b7\u0596\u05d9\u05b4\u05dd &#8216;\u00a0then it&#8217;s mean our controller \/ database is not properly working with these type of texts. Reason can be behind this <a href=\"https:\/\/webkul.com\/blog\/special-characters-problem\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[305,13],"tags":[1273,1274],"class_list":["post-11207","post","type-post","status-publish","format-standard","hentry","category-opencart","category-php","tag-special-characters-problem","tag-utf-8"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Special Characters Problem<\/title>\n<meta name=\"description\" content=\"Special Characters Problem\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/special-characters-problem\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Special Characters Problem\" \/>\n<meta property=\"og:description\" content=\"Special Characters Problem\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/special-characters-problem\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-11T10:22:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-06-11T10:24:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nikhil Malik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nikhil Malik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/special-characters-problem\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/special-characters-problem\/\"},\"author\":{\"name\":\"Nikhil Malik\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/9a90e1b1a80142fc7445195c9ca8c8a4\"},\"headline\":\"Special Characters Problem (Displaying &#8216;???&#8217;)\",\"datePublished\":\"2014-06-11T10:22:36+00:00\",\"dateModified\":\"2014-06-11T10:24:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/special-characters-problem\/\"},\"wordCount\":156,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"keywords\":[\"Special Characters Problem\",\"utf-8\"],\"articleSection\":[\"opencart\",\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/special-characters-problem\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/special-characters-problem\/\",\"url\":\"https:\/\/webkul.com\/blog\/special-characters-problem\/\",\"name\":\"Special Characters Problem\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2014-06-11T10:22:36+00:00\",\"dateModified\":\"2014-06-11T10:24:22+00:00\",\"description\":\"Special Characters Problem\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/special-characters-problem\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/special-characters-problem\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/special-characters-problem\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Special Characters Problem (Displaying &#8216;???&#8217;)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/9a90e1b1a80142fc7445195c9ca8c8a4\",\"name\":\"Nikhil Malik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/335b26b1a56ac61c8dcf3b6fa4c8c3d1e68ed57cd9db7e6f5dfa97cc506cf0d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/335b26b1a56ac61c8dcf3b6fa4c8c3d1e68ed57cd9db7e6f5dfa97cc506cf0d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Nikhil Malik\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/nikhil\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Special Characters Problem","description":"Special Characters Problem","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:\/\/webkul.com\/blog\/special-characters-problem\/","og_locale":"en_US","og_type":"article","og_title":"Special Characters Problem","og_description":"Special Characters Problem","og_url":"https:\/\/webkul.com\/blog\/special-characters-problem\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2014-06-11T10:22:36+00:00","article_modified_time":"2014-06-11T10:24:22+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png","type":"image\/png"}],"author":"Nikhil Malik","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Nikhil Malik","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/special-characters-problem\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/special-characters-problem\/"},"author":{"name":"Nikhil Malik","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/9a90e1b1a80142fc7445195c9ca8c8a4"},"headline":"Special Characters Problem (Displaying &#8216;???&#8217;)","datePublished":"2014-06-11T10:22:36+00:00","dateModified":"2014-06-11T10:24:22+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/special-characters-problem\/"},"wordCount":156,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"keywords":["Special Characters Problem","utf-8"],"articleSection":["opencart","php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/special-characters-problem\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/special-characters-problem\/","url":"https:\/\/webkul.com\/blog\/special-characters-problem\/","name":"Special Characters Problem","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2014-06-11T10:22:36+00:00","dateModified":"2014-06-11T10:24:22+00:00","description":"Special Characters Problem","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/special-characters-problem\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/special-characters-problem\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/special-characters-problem\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Special Characters Problem (Displaying &#8216;???&#8217;)"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/9a90e1b1a80142fc7445195c9ca8c8a4","name":"Nikhil Malik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/335b26b1a56ac61c8dcf3b6fa4c8c3d1e68ed57cd9db7e6f5dfa97cc506cf0d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/335b26b1a56ac61c8dcf3b6fa4c8c3d1e68ed57cd9db7e6f5dfa97cc506cf0d5?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Nikhil Malik"},"url":"https:\/\/webkul.com\/blog\/author\/nikhil\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/11207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=11207"}],"version-history":[{"count":2,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/11207\/revisions"}],"predecessor-version":[{"id":11218,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/11207\/revisions\/11218"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=11207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=11207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=11207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}