ChrisTERiS Posted November 27, 2020 Share Posted November 27, 2020 Hello all, I've a problem to display Georgian language (UTF-8) characters using this code: $ct_agreements = Capsule::table('mod_legalterms_articles') ->where('language',''.$_SESSION["Language"].'') ->orderBy('displayorder','asc') ->get(); } $encodedata = json_encode($ct_agreements); $decodedata = json_decode($encodedata, true); foreach($decodedata as $key => $value) { $title = $decodedata[$key]['title']; } This output the block below (the block title is correct), the titles not. In another place where I'm using normal MySQLi query, so no JSON output, everything works fine. Any idea/suggestion is welcome :) Thank you Chris 0 Quote Link to comment Share on other sites More sharing options...
ChrisTERiS Posted November 29, 2020 Author Share Posted November 29, 2020 Finally the problem is with all titles having special characters. eg German, Greek, Cyrillic and most probably Arabic etc. Does anyone knows what's wrong? The code is from a hook file. For testing purposes I change the query to a normal MySQLi query and everything works fine. So the problem is on the JSON. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.