I have a question table, which has HTML encoded records by the TinyMCE editor. The table has almost 5 thousand records. I am trying to list all records in DataTables using server-side functionality. While fetching HTML encoded data it outputs only ?????? (encoded data is multilingual). charset=utf-8' is defined.
            Asked
            
        
        
            Active
            
        
            Viewed 312 times
        
    0
            
            
        - 
                    I don't think there is sufficient information in your question to diagnose the `???` text. There are various places where you may be losing your UTF-8 encoding. It could even be as simple as the font you are using - does it actually support the range of characters you are trying to display? But there are other possiblities, too. – andrewJames Apr 26 '20 at 14:49
- 
                    Side note: Your code (which you should include as formatted text in the question, not as a screenshot, please) has content type set to `application/json` followed by content type set to `text\html`. And a comment which says it needs to be JSON. That looks suspicious, regardless of the `???` issue. – andrewJames Apr 26 '20 at 14:50
1 Answers
-1
            
            
        https://www.php.net/manual/en/function.iconv.php
Check out iconv. You can convert between character encodings.
 
    
    
        Madao
        
- 109
- 10
- 
                    Without Server-side processing, it works perfectly with data tables. – Vijender singh Apr 26 '20 at 11:24
- 
                    
- 
                    
- 
                    Already tried html_entity_decode(), but no help. I think something happens wrong while it processed through the JSON – Vijender singh Apr 26 '20 at 11:38
- 
                    
- 
                    is there any other method to serialize columns data without JSON to fetch? – Vijender singh Apr 26 '20 at 12:18
- 
                    



