This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Using JSONObject for Non-ascii text Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "Using JSONObject for Non-ascii text " Watch "Using JSONObject for Non-ascii text " New topic
Author

Using JSONObject for Non-ascii text

An Dao
Greenhorn

Joined: Mar 04, 2002
Posts: 5
I am trying to set a string in Java class and then display it in the html page. However, as my site can be localized to different language, so the string to be put in JSONObject can be non-ascii code, it can be english, russian, chinese, etc..
When I try to put these character set into JSON and display it in my html page, the non-ascii text display incorrectly.

Please help!



Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56191
    
  13

"Linda", please check your private messages for an important administrative matter.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3268

Hi there! I suggest you start here.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Using JSONObject for Non-ascii text
 
Similar Threads
Displaying XML as XML in HTML
retrieve JSON from servlet
Usage of inputTextarea in JSF
json object send to JSF backing bean to xhtml page
utf-8 on actionform