I am currently designing a mobile application for Android. The text and content are in the Local Indic Language, Tamil. For Welcome, the equivalent of Tamil translation is: வணக்கம்
. Since Android cannot display Indic Text, I am converting it using a service called JavaScript String Escape.
So this works in this way:
- Input:
வணக்கம்
- Output:
\u0BB5\u0BA3\u0B95\u0BCD\u0B95\u0BAE\u0BCD
How can I make this using JavaScript or PHP as I have huge loads of text to be converted and made it into JSON. Sample JSON:
{
"title": "\u0BAE\u0BB0\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0BB5\u0BB0\u0BBF\u0BA9\u0BCD \u0BAA\u0BC6\u0BAF\u0BB0\u0BCD #1",
"image": "http://www.exceptnothing.com/doctors/doc11.png",
"rating": "\u2713 \u0B87\u0BAA\u0BCD\u0BAA\u0BC7\u0BBE\u0BA4\u0BC1 \u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BB2\u0BBE\u0BAE\u0BCD",
"rating2": "",
"releaseYear": "\u0BA8\u0BBE\u0BB3\u0BCD \u0BAE\u0BC1\u0BB4\u0BC1\u0BB5\u0BA4\u0BC1\u0BAE\u0BCD \u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BB2\u0BBE\u0BAE\u0BCD",
"genre": ["\u25B6 \u0B87\u0BA4\u0BAF \u0BA8\u0BBF\u0BAA\u0BC1\u0BA3\u0BB0\u0BCD"]
}
I also would like to know how to decode the above JSON and show it as வணக்கம்
. Thanks in advance.