Friday, 15 March 2013

java - How to encode utf_general_ci data to a human readable string? -


I know this may seem very easy, but I'm stacked due to this issue for the day. This thing is using the utf_general_ci to store the data that users save in different types of languages. What I want to do is display an example in human readable text.

The user enters the text 'ዝ', and will be credited in the form of 'á <' as utfagrey_journal_c.

I want to show the original text to the user who 'ዝ' how can I do this. Data is stored in MySQL PHP, I want to convert it to Java or Jason file. What is the plan?

Here is the json code

  & lt ;? Php header ('content-type: application / jason; charset = utf 8; http-equiv =' type of content '); $ result = $ db- & gt; query (select "from movie'); while ($ Line = mysqli_fetch_array ($ result)) {$ output [==] ('MovieID' => $ line ['MovieID']); $ output [] = array ('title' = & gt; $ line [' Title ']);} echo json_encode ($ output, JSON_UNESCAPED_UNICODE);  

The inclusion statement is very simple and I have to head the web

  & lt; Meta content = "text / html; Is defined as. Charset = utf-8 "http-equiv =" content-type "& gt;  


No comments:

Post a Comment