Solved

Unicode

Posted on 2006-07-23
7
254 Views
Last Modified: 2010-03-31
Hi guys,

I am confused now. I am trying to submit chinese input to my WebLogic app.

If I specified
<%@ page language="java" contentType="text/html;charset=ISO-8859-1"%>

it returns something like
&#24536; &#24535;...blah blah

but if I specified
<%@ page language="java" contentType="text/html;charset=UTF-8"%>

it returns me something like
&#xE5; &#xBF

Well, I think that the appropriate ways is to use UTF-8 but now I am confused why ISO-8859-1 is capable to handle &#24536;. I thought that ISO-8859-1 is only for Latin language and it should not accept Chinese (unicode)?

David
0
Comment
Question by:suprapto45
  • 3
  • 2
  • 2
7 Comments
 
LVL 13

Expert Comment

by:marchent
Comment Utility
>> <%@ page language="java" contentType="text/html;charset=UTF-8"%>

there are few encoding schemes for unicode, try for all
UTF-16 works with chinese letter.

~marchent~

0
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
>> I thought that ISO-8859-1 is only for Latin language and it should not accept Chinese

I guess it can handle Chinese too.
0
 
LVL 16

Author Comment

by:suprapto45
Comment Utility
Thanks guys :),

marchent >> Can you explain me why my confusion above is happening?

mayankeagle >> Yeah, I think so but when I tried to *google* it, ISO only lists out English as well as Latin characters. There is no single site mentioning that ISO can handle Chinese in whatever way.

David
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 16

Author Comment

by:suprapto45
Comment Utility
Btw,

Why don't we have another thread to congratulate you, mayankeagle to reach Java genius?

Well, CONGRATULATION........you are one of the genius in Java now ;)

David
0
 
LVL 13

Accepted Solution

by:
marchent earned 500 total points
Comment Utility
i'm not sure why that is happening with u. but u can check here how the unicode encoded in various way

http://czyborra.com/utf/
http://www.cl.cam.ac.uk/~mgk25/unicode.html

~marchent~
0
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
>> Why don't we have another thread to congratulate you, mayankeagle to reach Java genius

Thanks :) I don't know - ask Venabili on her recent PE notifier thread ;-)
0
 
LVL 16

Author Comment

by:suprapto45
Comment Utility
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
basic hardware to learn oop advanced design patterns 3 72
array11 challenge 16 51
strCopies  challenge 17 73
strDist challenge 35 84
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now