File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Using JSONObject for Non-ascii text " Watch "Using JSONObject for Non-ascii text " New topic

Using JSONObject for Non-ascii text

An Dao

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

Joined: Jan 10, 2002
Posts: 63852

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

[Asking smart questions] [About Bear] [Books by Bear]
Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

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:
subject: Using JSONObject for Non-ascii text
jQuery in Action, 3rd edition